c#


l_list .Select (p=>p.ID = "001");

int l_sum = l_list.Where (a=>a.Price >20).Sum(p => p.Price);


VB 


l_list.Select(Function(p) p.ID = "001" )

Dim l_sum As Integer = l_list.Where (Function(a) a.Price >20).Sum(Function(p) p.Price)

創作者介紹
創作者 Ryan的blog 的頭像
Ryan

Ryan的blog

Ryan 發表在 痞客邦 留言(0) 人氣( 118 )