Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Min< TSource >() [2/12]

static decimal System.Linq.Enumerable.Min< TSource > ( this IEnumerable< TSource > source,
Func< TSource, decimal > selector )
inlinestatic

Definition at line 7064 of file Enumerable.cs.

7065 {
7066 if (source == null)
7067 {
7068 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
7069 }
7070 if (selector == null)
7071 {
7072 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.selector);
7073 }
7074 using IEnumerator<TSource> enumerator = source.GetEnumerator();
7075 if (!enumerator.MoveNext())
7076 {
7077 ThrowHelper.ThrowNoElementsException();
7078 }
7079 decimal num = selector(enumerator.Current);
7080 while (enumerator.MoveNext())
7081 {
7082 decimal num2 = selector(enumerator.Current);
7083 if (num2 < num)
7084 {
7085 num = num2;
7086 }
7087 }
7088 return num;
7089 }

References System.Collections.Generic.Dictionary< TKey, TValue >.GetEnumerator(), System.Linq.selector, System.Linq.source, System.Linq.ThrowHelper.ThrowArgumentNullException(), and System.Linq.ThrowHelper.ThrowNoElementsException().