Category: CSharp Articles

C# 3.0 New Features

C# 3.0 New Features 1. Implicit typing of local variables, which permits the types of local variables to be inferred from the expressions used to initialize them 2. Extension methods, which make it possible to extend existing types and constructed types with additional methods, outside their definitions 3. Lambda expressions, an […]

ASP.NET , C# – Configuring to use XML to display error and validation message

ASP.NET , C# – Configuring to use XML to display error and validation message Step 1 – Add XML file to store error and validation message.               Below is sample of ErrorMessage.xml :<?xml version=“1.0“ encoding=“utf-8“ ?><appSettings><add key=“NoMatchingRecord“ value=“No Matching Records Found“/><appSettings>                   Below is sample of ValidationMessage.xml :<?xml version=”1.0″ […]

C# Partial Methods

C# Partial Methods Partial methods can be defined in one part of a type declaration and implemented in another. The implementation is optional; if no part implements the partial method, the partial method declaration and all calls to it are removed from the type declaration resulting from the […]

C# 3.0 language enhancements

The C# 3.0 language enhancements consist of: • Anonymous types – are types which are automatically inferred and created from object initializers• Implicitly typed local variables – This permits the type of local variables to be inferred from the expressions used to initialize them.• Auto-implemented properties – This […]

%d bloggers like this: