• VB9• C#3• IDE enhancements for .NET Fx 3.0• .NET Fx 3.5• Impact of Windows Server 2008 for developers
The main points are that the CLR engine is the same version (so no need to retest your apps) and that the headline feature is the language enhancements (C#3 & VB9 compilers) and LINQ.
The main points are that the CLR engine is the same version (so no need to retest your apps) and that the headline feature is the language enhancements (C#3 & VB9 compilers) and LINQ.
C# - started as “the (first) language for CLR”; emphasize the pragmatic approach (cf. Anders Hejlsberg) = be explicit about language features like properties, events, etc. developer confidence2.0 = generics wave (impact on CLR) + additional useful things (that do require generics on their own + that are useful on their own)3.0 = LINQ + making the language more concise, more productive, more powerful, ...
LINQ: tell the story of Reflex 2.0, Dbase III+, ... where data and code were close together structured + distributed programming changed this = layered approach result: data and code on two islands with a huge gap between the two need for O/R mapping tools etcWith LINQ: data becomes a first-class citizen of the languageReduce “language noise” (e.g. tiresome repetitive code etc)API independent you can reimplement stuff on your own, the language doesn’t care about it (e.g. extension methods on Ienumerable<T>, don’t mention the word yet)Backward compat: refer to MSR paper on formal proof of the possibility for translation of every C# 3.0 program to an equivalent C# 2.0 program (semantically)
Build up the slide and introduce “syntactical sugar”. Story telling approach referring back to the gap between data and code and the LINQ solution using Language Integrated queries requires glue: functional style programming concepts, introduction of concepts from the relational world (e.g. projection clauses require anonymous types) and language simplification (e.g. object initializers).Use the words:-Different compilation stages (front-end query syntax is translated into “pure” C# into ..., e.g. resolution of query expressions to chains of method calls)-Method call chain (can still be instance methods or extension methods)
VB = longer history (up to 9.0)Refer to huge transition from 6.0 to .NET which implied the creation of a runtime library for bw compat: play the rules of the CLS (OO for example) and remain consistent with VB pre-.NETVB 8.0 = GenericsVB 9.0 = LINQ + XML (difference with C#)
Similar story as in C# 3.0 except for XML integration; emphasize that language evolutuon doesn’t mean that languages have to go hand in hand on any field.
Réf : http://www.dotnetguru.org/articles/dossiers/anonymescsharp2/CS2_AnonymousMethod_FR.htmThe delegate keyword is used to declare a reference type that can be used to encapsulate a named or an anonymous method. Delegates are similar to function pointers in C++; however, delegates are type-safe and secure. For applications of delegates, see Delegates and Generic Delegates.
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.Indispensable pour les types anonymeshttp://msdn2.microsoft.com/fr-fr/library/bb384061(VS.90).aspx
Collection initializers provide a way to specify one or more object intializers when initializing any collection class that implements IEnumerable. By using a collection initializer you do not have to specify multiple calls to the Add method of the class in your source code; the compiler adds the calls2ème exemple :The following collection initializer uses object initializers to initialize objects of the Test class defined in an earlier example. Note that the individual object initializers are enclosed in braces and separated by commas.