This is the C# Code for Find display Odd or Even Number using LINQ .
var numbers = from n in Enumerable.Range(1,25)
select new {number = n,OddEven =n %2 ==1? "odd","Even"};
foreach(var n in mubers)
{
listbox1.items.add("The Number is" ,+n.number +n.OddEven);
}
select new {number = n,OddEven =n %2 ==1? "odd","Even"};
foreach(var n in mubers)
{
listbox1.items.add("The Number is" ,+n.number +n.OddEven);
}