Monday, 19 August 2013

Using LINQ with conditions

Using LINQ with conditions

Given a class
public class data
{
public string x;
public double y;
}
List<data> myList = new List<data>();
The list is then populated with data either with string "odd", string
"even" with the respective number.
how would I get the sum of all the x = "odd" using linq
This is will be basic to most, please pardon my ignorance...

No comments:

Post a Comment