LINQ query operation consists of the following actions,

Our query expression syntax looks like this,


Here from array names, take each array element into a variable called name and select them all.
About Latest visual studio news, Sample Code. SQL server News and Samples , Latest Web technology and more....
Here from array names, take each array element into a variable called name and select them all.
Select - Simple
This sample prints a integers Hundred greater than those in an input array. The sample uses the expression in the select clause to add hundred to each element in the new sequence.
public void Linqsample()
{
int[] numbers = { 500, 400, 100, 300, 900, 800, 600, 700, 200, 000 };
var numsPlusOne = from n in numbers
select n + 100;
Console.WriteLine("Numbers + 100:");
foreach (var i in numsPlusHundred)
{ Console.WriteLine(i); }
}
Result
Numbers + 1:
600
500
200
400
1000
900
700
800
300
100