Enumerable.Min Method (IEnumerable(Of Nullable(Of Double)))
[ 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 Double values.
Assembly: System.Core (in System.Core.dll)
'Declaration <ExtensionAttribute> _ Public Shared Function Min ( _ source As IEnumerable(Of Nullable(Of Double)) _ ) As Nullable(Of Double)
Parameters
- source
- Type: System.Collections.Generic.IEnumerable(Of Nullable(Of Double))
A sequence of nullable Double values to determine the minimum value of.
Return Value
Type: System.Nullable(Of Double)A value of type Nullable<Double> in C# or Nullable(Of Double) 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 Double)). 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 Double))) method uses the Double 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.
The following code example demonstrates how to use Min(IEnumerable(Of Nullable(Of Int32))) to determine the minimum value in a sequence.
Note: |
|---|
|
This code example uses an overload of this overloaded method that is different from the specific overload that this topic describes. To extend the example to this topic, substitute the elements of the source sequence with elements of the appropriate numerical type. |
Note: