col1 col2 col3 col4 col5 col6 col7 col8 col9 col10 ---- 3000 500 123 528 ---- ---- lose 12/05/2014 ---- ---- 4000 600 456 628 ---- ---- profit 13/02/2014 ---- ---- 5000 700 789 728 ---- ---- pending 15/06/2013 ---- ---- 6000 800 201 828 ---- ---- Completed 01/01/2013 ----
var result = yourlist.Where(x => x.col8 == "profit").Sum(x => x.col2 + x.col3 + x.col4+ x.col5);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)