Mega Code Archive

 
Categories / C# Tutorial / LINQ
 

Reflecting result from Linq

using System; using System.Collections.Generic; using System.Text; using System.Xml.Linq; using System.Linq;     class Program     {         static void Main(string[] args)         {             string[] currentVideoGames = {"q", "2",                                    "this is a test", "aaa",                                   "eee", "System"};             var subset = from game in currentVideoGames                                   where game.Length > 6                                  orderby game                                  select game;             foreach (var s in subset)                 Console.WriteLine("Item: {0}", s);             Console.WriteLine("resultSet is of type: {0}", subset.GetType().Name);             Console.WriteLine("resultSet location: {0}", subset.GetType().Assembly);                  }     }