I'm producing a list of decimal values from a linq expression and I want the minimum non zero value. However it's entirely possible that the linq expression will result in an empty list.
This will raise an exception and there is no MinOrDefault to cope with this situation.
decimal result = (from Item itm in itemList
where itm.Amount > 0
select itm.Amount).Min();
What's the neatest way to set the result to 0 if the list is empty?