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

◆ Min() [10/10]

static ? long System.Linq.Enumerable.Min ( this IEnumerable< long?> source)
inlinestatic

Definition at line 6394 of file Enumerable.cs.

6395 {
6396 if (source == null)
6397 {
6398 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
6399 }
6400 long? result = null;
6401 using IEnumerator<long?> enumerator = source.GetEnumerator();
6402 while (enumerator.MoveNext())
6403 {
6404 result = enumerator.Current;
6405 if (!result.HasValue)
6406 {
6407 continue;
6408 }
6409 long num = result.GetValueOrDefault();
6410 while (enumerator.MoveNext())
6411 {
6412 long? current = enumerator.Current;
6413 long valueOrDefault = current.GetValueOrDefault();
6414 if (current.HasValue && valueOrDefault < num)
6415 {
6416 num = valueOrDefault;
6417 result = current;
6418 }
6419 }
6420 return result;
6421 }
6422 return result;
6423 }

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