Building Query Expressions Using the Enumerable Type
and Lambdas
Keep in mind that the LINQ query operators used here are simply shorthand versions for
calling various extension methods defined by the Enumerable type. Consider the following
QueryStringsWithEnumerableAndLambdas() method, which is processing the local string array
now making direct use of the Enumerable extension methods:
static void QueryStringsWithEnumerableAndLambdas()
{
Console.WriteLine("***** Using Enumerable / Lambda Expressions *****");
string[] currentVideoGames = {"Morrowind", "BioShock",
"Half Life 2: Episode 1", "The Darkness",
"Daxter", "System Shock 2"};
Do'stlaringiz bilan baham: |