Enumerable.Min Method (IEnumerable(Of Nullable(Of Int32)))
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Returns the minimum value in a sequence of nullable Int32 values.
Assembly: System.Core (in System.Core.dll)
'Declaration <ExtensionAttribute> _ Public Shared Function Min ( _ source As IEnumerable(Of Nullable(Of Integer)) _ ) As Nullable(Of Integer)
Parameters
- source
- Type: System.Collections.Generic.IEnumerable(Of Nullable(Of Int32))
A sequence of nullable Int32 values to determine the minimum value of.
Return Value
Type: System.Nullable(Of Int32)A value of type Nullable<Int32> in C# or Nullable(Of Int32) in Visual Basic that corresponds to the minimum value in the sequence.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable(Of Nullable(Of Int32)). When you use instance method syntax to call this method, omit the first parameter.| Exception | Condition |
|---|---|
| ArgumentNullException | source is Nothing. |
The Min(IEnumerable(Of Nullable(Of Int32))) method uses the Int32 implementation of IComparable(Of T) to compare values.
If the source sequence is empty or contains only values that are Nothing, this function returns Nothing.
In Visual Basic query expression syntax, an Aggregate Into Min() clause translates to an invocation of Enumerable.Min.