an untidy nested query : Nested Query : LINQ C# Source Code


Custom Search

C# Source Code » LINQ » Nested Query »

 

an untidy nested query








    
 

using System;
using System.Collections.Generic;
using System.Linq;
public class MainClass {
    public static void Main() {
        string[] names = { "Tom", "Dick", "Harry", "Mary", "Jay" };

        IEnumerable<string> query =
          Enumerable.Select(
            Enumerable.OrderBy(
              Enumerable.Where(
                names, n => n.Contains("a")
              ), n => n.Length
            ), n => n.ToUpper()
          );
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo LINQ
» Nested Query