Hi,
I have a class and a list as below:
class C1
{
int RecType ...;
decimal Income ...;
decimal Outcome ...;
}
List<C1> myList ...;
The list is loaded with several records, and they have various values in RecType What I want is to calculate total on Income and Outcome but only for a certain value of RecType
Here's a pseudo code of what I need to get
totalIncome = myList.Sum(Income).Where(RecType==1);
How can I accomplish this with linq?
Thank you