LINQ where - operation
int[]array ={1,2,3,4,5,6,7,8};
var between5 = from N in array where N < 5 select N;
foreach(var elements in between5)
{
Response.write(elements);
}
// Transforming the array into ToList
ToList - LINQ
string[] name ={"Senthil","Murugesan","Karthick"};
var Name = from SP in name order by K select K
var namelist=Name.ToList()
foreach(var item in namelist)
{
Response.write(item);
}
// Loading XML document in LINQ
var record = from e in XElement.Load(Server.Mappath("students.xml").Element("Name") select e.Element("Name");
foreach(students in record)
{
Response.write(students);
}