- Object oriented programming.
- Flexibility of language to use.
- Design and logic code remains apart.
- Compiled code gets executed faster.
- Xcopy style deployment.
- Language interoperable.
- ViewState management.
- Facility of WebControls.
- Validation controls.
- Easy integration of WebService.
- Facility to select authentication level.
- Facility to select state management.
- Web.Config file that manage the configuration of overall application.
- Support of HTML and ASP.NET controls.
- Power of ADO.NET
- The basic idea is straightforward - an instance of a value type represents the actual data (stored on the stack), whereas an instance of a reference type represents a pointer or reference to the data (stored on the heap).
- C# supports multiple inheritance of interfaces, but not of classes
- What is a static constructor?
A constructor for a class, rather than instances of a class. The static constructor is called when the class is loaded.
- A delegate is a class derived from System.Delegate. However the language has a special syntax for declaring delegates which means that they don't look like classes. A delegate represents a method with a particular signature. An instance of a delegate represents a method with a particular signature on a particular object (or class in the case of a static method).
- Conceptually delegates can be used in a similar way to an interface with a single method. The main practical difference is that with an interface the method name is fixed, whereas with a delegate only the signature is fixed - the method name can be different, as shown in the example above
- Use the String.Compare function. Its third parameter is a boolean which specifies whether case should be ignored or not.
"fred" == "Fred" // false
System.String.Compare( "fred", "Fred", true ) // true