SYSK 172: C# 3.0 is Not Part of .NET 3.0
.NET 3.0 will be released with Vista. It will not contain C# 3.0, but will ship with C# 2.0.
The major features of .NET 3.0 are: Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), Windows Workflow Foundation (WF), and Windows CardSpace (WCS, formerly “InfoCard”).
Visual C# 3.0 will be released as a part of the next Visual Studio release.
C# 3.0 will include features like:
- Implicitly typed local variables using var keyword, e.g. var i = 5; would be equivalent to int i = 5; and var numbers = new int [] {1, 2, 3}; is equivalent to int[] numbers = new int [] {1, 2, 3};
- Extension methods – static methods that can be invoked using instance method syntax (VB.NET developers have enjoyed having this feature for some time now, albeit with a compile time warning)
- So called “lambda expressions” -- anonymous methods, which allow code blocks to be written “in-line” where delegate values are expected
- Type inference – attempt to deduce argument type when one is not specified during a call to a generic method
- Object initializers -- property setting during object construction, e.g.
Point p = new Point{X=0, Y=1};
- LINQ (language integrated query)
- Etc.
For complete feature list and examples, please visit http://download.microsoft.com/download/5/8/6/5868081c-68aa-40de-9a45-a3803d8134b8/CSharp_3.0_Specification.doc
Comments
- Anonymous
August 07, 2006
And as others out here have said countless times... this is yet another reason why the ".NET 3.0" moniker is so darned stupid! - Anonymous
August 07, 2006
Is there a place/blog where I can find snippets of code using the C# 3.0 features so I can familiarize with some of the concepts? Thanks. - Anonymous
August 07, 2006
If the spec at http://download.microsoft.com/download/5/8/6/5868081c-68aa-40de-9a45-a3803d8134b8/CSharp_3.0_Specification.doc is insufficient, check out http://blogs.tedneward.com/2005/09/22/Language+Innovation+C+30+Explained.aspx
For LINQ info: http://msdn.microsoft.com/data/ref/linq/