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

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

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

Definition at line 6840 of file Enumerable.cs.

6841 {
6842 if (source == null)
6843 {
6844 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
6845 }
6846 if (selector == null)
6847 {
6848 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.selector);
6849 }
6850 using IEnumerator<TSource> enumerator = source.GetEnumerator();
6851 if (!enumerator.MoveNext())
6852 {
6853 ThrowHelper.ThrowNoElementsException();
6854 }
6855 long num = selector(enumerator.Current);
6856 while (enumerator.MoveNext())
6857 {
6858 long num2 = selector(enumerator.Current);
6859 if (num2 < num)
6860 {
6861 num = num2;
6862 }
6863 }
6864 return num;
6865 }

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