Mono have just released the 1.2.5.
This new version bring a pack of things as usual…
- Dynamic language runtime (DLR) which is the big part of moonlight.
- the C# 3.0 features (minus query expression of LINQ):
- Type inference: the “var” keyword
expl: var i = 1; var intArr = new[] {1, 2, 3, 4}
- Anonymous types: the compiler will generate a class which fit to the behaviour of your constructor. (quite like duck in ruby)
expl: new {hair=”black”, skin=”green”, teethCount=64}
- Object/Collection initialization: specified values of fields/properties in constructor
expl: var myCoord = new Coordinate{ x = 0, y= 0} ;
List<string> animals = new List<string> {“monkey”, “donkey”, “cow”, “dog”, “cat”} ; - Automatic properties: generate the private variable linked to the propertie
expl: public string Bar {get; set;} will fill the get and set with a private field. - extension methods: extend a class with a new method (like partial class)
expl: public static ToInt32(this string s) {…} will extend the string class with this function - lambdas expression: anonymous methods in more concise syntax
expl: s => Console.Writeline(s);
- Type inference: the “var” keyword
- Runtime optimisation
- Improove .NET 2.0 support (System.core, System.Data, winforms)
- VB.NET bugfix





