Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
(like everyone else ?) I've finished reading the C#3 Spec and the LINQ project overview.
with samples like:
public void Linq43() { List customers = GetCustomerList(); var customerOrderGroups = from c in customers select new {c.CompanyName, YearGroups = from o in c.Orders group o by o.OrderDate.Year into yg select new {Year = yg.Key, MonthGroups = from o in yg.Group group o by o.OrderDate.Month into mg select new {Month = mg.Key, Orders = mg.Group} } };ObjectDumper.Write(customerOrderGroups, 3);}
Hey - that's de ja vous all over again :)
Actually it is (er..will be) much stronger than SQL - for one, you can use a single LINQ query to combine data from arrays and data and XML and whatever. Also combined with lambda expressions (next gen for anonymous methods ) you'd have even more power.
While I am on the subject of what's new in C# 3.0 - I also found Extension methods very interesting - it kind of lets you have a look and feel of multiple inheritance without the associated headaches
consider the following
namespace MultipleInheritanceSimulation{ public static class Extensions { public static void DoSomething<T>(this T var) { //do whatever } }}
And then:
using MultipleInheritanceSimulation;namespace Tester{ public class Foo { public void Bar() { MyClass x; MyOtherClass y; x.DoSomething(); y.DoSomething(); } }}
oh well,enough playing - back to work...
Remember Me