Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: TSource MinOrDefault<TSource>(this IEnumerable<TSource>, TSource)

Declaration

public static TSource MinOrDefault<TSource>(
    this IEnumerable<TSource> source,
    TSource default = null
)

Summary

Returns the minimum resulting value in a sequence, or a default value if the sequence is empty.

Generic type parameters

TSource The type of the elements of source.

Parameters

this IEnumerable<TSource>source A sequence of values to determine the minimum value of.
TSourcedefault A default value to return in case the sequence is empty.

Returns

The minimum value in the sequence, or the specified default value if the sequence is empty.