 | CondensedCollectionExtensionsMinTSource, TResult Method (CondensedCollectionTSource, FuncTSource, TResult) |
[This is preliminary documentation and is subject to change.]
Invokes a transform function on each element of a generic sequence and returns the minimum resulting value. Optimized for a CondensedCollection.
Namespace:
Condensed.Linq
Assembly:
Condensed (in Condensed.dll) Version: 0.1.0.0 (0.1.0.0)
Syntaxpublic static TResult Min<TSource, TResult>(
this CondensedCollection<TSource> source,
Func<TSource, TResult> selector
)
<ExtensionAttribute>
Public Shared Function Min(Of TSource, TResult) (
source As CondensedCollection(Of TSource),
selector As Func(Of TSource, TResult)
) As TResult
public:
[ExtensionAttribute]
generic<typename TSource, typename TResult>
static TResult Min(
CondensedCollection<TSource>^ source,
Func<TSource, TResult>^ selector
)
[<ExtensionAttribute>]
static member Min :
source : CondensedCollection<'TSource> *
selector : Func<'TSource, 'TResult> -> 'TResult
Parameters
- source
- Type: CondensedCondensedCollectionTSource
A sequence of values to determine the minimum value of. - selector
- Type: SystemFuncTSource, TResult
A transform function to apply to each element.
Type Parameters
- TSource
- The type of the elements of source.
- TResult
- The type of the value returned by selector.
Return Value
Type:
TResultThe minimum value in the sequence or, if TSource is reference type, null if source is empty or contains only null values.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
CondensedCollectionTSource. 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
Remarks
This implementation of Min() is specialized for a CondensedCollection and tries to
take advantage of the CondensedCollection's knowledge of unique values in order to improve performance.
If you would rather use the normal LINQ extension method then cast the CondensedCollection to an
IListT
to use the
MaxTSource, TResult(IEnumerableTSource, FuncTSource, TResult) implementation.
See Also