Consider the following snippet of code:
// get number of sheep in DataTable by counting UID's
Double n = DataTableContainingSheep.AsEnumerable().Sum(r => (Int32)r["sheepId"])
What I if want to count only the black sheep in the DataTable? Is there any way I can fit a select-clause into the Sum()
function?