Tuesday, July 21, 2009

Whats New in C#.NET 2008?

Many improvements have been made to the C# compiler to remove inconsistencies with the language specification. Some of these improvements are breaking changes, but others are just software updates or enhancements.
Implicitly Typed Local Variables and Arrays: When used with local variables, the var keyword instructs the compiler to infer the type of the variable or the array elements from the expression on the right side of the initialization statement.
Object Initializes: Enables object initialization without explicit calls to a constructor.
Collection Initializes: Enables initialization of collections with an initialization list rather than specific calls to Add or another method.
Extension Methods: Extend existing classes by using static methods that can be invoked by using instance method syntax. Anonymous Types: Enables on-the-fly creation of unnamed structured types that can be added to collections and accessed by using var.

Lambda Expressions: Enables inline expressions with input parameters that can be bound to delegates or expression trees. Multi-targeting: Visual Studio 2008 enables you to specify a version of the .NET Framework for your project, .NET Framework 2.0, 3.0, or 3.5. The .NET Framework target of an application is the version of the .NET Framework that is required on a computer to enable the application to run on that computer. For more information, see Targeting a Specific .NET Framework.

No comments:

Post a Comment