Getting values from collection using LINQ.

Posted by Vishalneeraj-24503 under LINQ category on | Points: 40 | Views : 229
Suppose,we have string array which contains the name of the person:-
string[] Name = {"vishal", "Varun", "kishor", "neeraj" };
IEnumerable GetResult = (from name in Name
where name.Equals("vishal")
select name);

foreach (string output in GetResult)
Response.Write(output + "<br/>");

Comments or Responses

Login to post response