This example shows how you can simply find aggregate functions like sum, average etc from a Obervablecollection list.
ObservableCollection and Model-View-ViewModel is a ideal for a typical WPF application, these are programmers two of the best tools.
In this example I am using a model class , and want to find sum of inventory qty from batch list.
double qty=_batches.Sum((b) => b.qty));
Here _batches is representing the ObservableCollection of Model batch.