News for hackers. Stuff that matters.
Re:Longest and Shortest Type Name in .NET 4.0 using LINQ by noblethrasher on Sunday August 15, 2010 @01:06AM (#1604642)
C# in one line (though I do love F#)

    var currentNetTypes = from a in System.AppDomain.CurrentDomain.GetAssemblies()
                                  from y in a.GetExportedTypes()
                                  where a.FullName.Contains("Version=4.0.0.0")
                                  orderby y.Name.Length
                                  select y;

Or possibly:

     var currentNetTypes = from a in System.AppDomain.CurrentDomain.GetAssemblies()
    .Where(x => x.FullName.Contains("Version=4.0.0.0"))
                                  from y in a.GetExportedTypes()
                                  orderby y.Name.Length
                                  select y;

There are no comments on this comment yet.