Whetstone Class reference
Whetstone Class reference
Whetstone
WhetStone Namespaces
WhetStone.Looping
getMin Class
getMin Methods
GetMin Method
GetMin(T) Method (IEnumerable(T), IComparer(T))
GetMin(T) Method (IEnumerable(T), Int32)
GetMin(T) Method (IEnumerable(T), IComparer(T), Int32)
getMin
GetMin
T
Method (IEnumerable
T
, IComparer
T
, Int32
)
Get the smallest element in an
IEnumerable
T
.
Namespace:
WhetStone.Looping
Assembly:
WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax
C#
Copy
public
static
T
GetMin
<T>(
this
IEnumerable
<T>
tosearch
,
IComparer
<T>
compare
,
out
int
index
)
Parameters
tosearch
Type:
System.Collections.Generic
IEnumerable
T
The
IEnumerable
T
to search in.
compare
Type:
System.Collections.Generic
IComparer
T
The
IComparer
T
to find the smallest element.
index
Type:
System
Int32
The index of the largest element.
Type Parameters
T
The type of the elements.
Return Value
Type:
T
The smallest element in
tosearch
.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerable
T
. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic)
or
Extension Methods (C# Programming Guide)
.
Exceptions
Exception
Condition
ArgumentException
If
tosearch
is empty.
See Also
Reference
getMin Class
GetMin Overload
WhetStone.Looping Namespace