c# - Sum using from clause (linq) -


i've got following command:

var sum = mylist.sum(p => p.field); 

is possible write same command using clause? eg.

var sum = mylist ... 

there no expression sum in notation. here close can get:

var sum = (from p in mylist select p.field).sum(); 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -