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

◆ Min() [2/10]

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

Definition at line 6594 of file Enumerable.cs.

6595 {
6596 if (source == null)
6597 {
6598 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
6599 }
6600 decimal? result = null;
6601 using IEnumerator<decimal?> enumerator = source.GetEnumerator();
6602 while (enumerator.MoveNext())
6603 {
6604 result = enumerator.Current;
6605 if (!result.HasValue)
6606 {
6607 continue;
6608 }
6609 decimal num = result.GetValueOrDefault();
6610 while (enumerator.MoveNext())
6611 {
6612 decimal? current = enumerator.Current;
6613 decimal valueOrDefault = current.GetValueOrDefault();
6614 if (current.HasValue && valueOrDefault < num)
6615 {
6616 num = valueOrDefault;
6617 result = current;
6618 }
6619 }
6620 return result;
6621 }
6622 return result;
6623 }

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