Reflect result from Linq in CSharp
Description
The following code shows how to reflect result from Linq.
Example
using System;/* ww w . j a va 2 s . c om*/
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);
}
}
The code above generates the following result.