Say I have a List<double> called nums. If I want to get the minimum of nums, which is a sequence of doubles, I have two options:
- use
Min(IEnumerable<Double>)-- i.e. dodouble minNum = nums.Min(); - use
Min<TSource>(IEnumerable<TSource>)-- i.e. dodouble minNums = nums.Min<double>();
What's the difference? Why does C# offer both of these options instead of just offering just the generic version?