Here we take a simple example of LINQ. We just compare a number with a number of digits:
- int[] digits = { 5, 4, 1, 7, 9, 8, 6, 7, 4, 5 };
- var num =
- from n in digits
- where n >= 6
- select n;
- Console.WriteLine("Numbers < 5:");
- foreach (var x in num)
- {
- Response.Write(x);
- }

Amit Kumar SinghPosted Jan 18, 2019, 5:33 AM
Thanks !!!
Saber ShaikhPosted Dec 16, 2014, 12:09 AM
Example For LINQ Esay To UnderStand int[] digits = { 5, 4, 1, 7, 9, 8, 6, 7, 4, 5 }; // Set Array var num = // Declaration from n in digits // Start Query where n >= 6 // Query Condition select n; // Select Record Console.WriteLine("Numbers < 5:"); // just only Print foreach (var x in num) { Response.Write(x); // One By One Print Record By Using Foreach } Thank You http://aspnettutorialscode.blogspot.in/