Quantcast
Channel: How to use an aggregate function in linq - Stack Overflow
Viewing all articles
Browse latest Browse all 3

How to use an aggregate function in linq

$
0
0

I want to get the average of this query.

From d In (From c In location.Descendants("temperature") Where c.Attribute("type").Value = "hourly" Select c).Descendants("value")                 Take 3                Select d

I can see the aggregate keyword in the autocomplete dropdown, but I cant figure out how to apply it. Can you give me some pointers?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images