To begin, create a new Console Application named LinqUsingEnumerable. The Program class will
define a series of static helper methods (each of which is called within the Main() method) to
illustrate the various manners in which we can build LINQ query expressions. The
first method,
QueryStringsWithOperators(), offers the most straightforward way to build a query expression and
is identical to the code seen in the previous LinqOverArray example:
static void QueryStringWithOperators()
{
Console.WriteLine("***** Using Query Operators *****");
string[] currentVideoGames = {"Morrowind", "BioShock",
"Half Life 2: Episode 1", "The Darkness",
"Daxter", "System Shock 2"};
Do'stlaringiz bilan baham: