 | CondensedCollectionExtensionsMaxTSource Method (CondensedCollectionTSource, FuncTSource, NullableInt64) |
[This is preliminary documentation and is subject to change.]
Computes the maximum value of a CondensedCollection of nullable Int64 values that are obtained by invoking a transform
function on each element of the input sequence. Optimized for a CondensedCollection.
Namespace:
Condensed.Linq
Assembly:
Condensed (in Condensed.dll) Version: 0.1.0.0 (0.1.0.0)
Syntaxpublic static Nullable<long> Max<TSource>(
this CondensedCollection<TSource> source,
Func<TSource, Nullable<long>> selector
)
<ExtensionAttribute>
Public Shared Function Max(Of TSource) (
source As CondensedCollection(Of TSource),
selector As Func(Of TSource, Nullable(Of Long))
) As Nullable(Of Long)
public:
[ExtensionAttribute]
generic<typename TSource>
static Nullable<long long> Max(
CondensedCollection<TSource>^ source,
Func<TSource, Nullable<long long>>^ selector
)
[<ExtensionAttribute>]
static member Max :
source : CondensedCollection<'TSource> *
selector : Func<'TSource, Nullable<int64>> -> Nullable<int64>
Parameters
- source
- Type: CondensedCondensedCollectionTSource
A CondensedCollection of values to determine the maximum value of. - selector
- Type: SystemFuncTSource, NullableInt64
A transform function to apply to each element.
Type Parameters
- TSource
- The type of the elements of source.
Return Value
Type:
NullableInt64The maximum value in the sequence, or null if the source sequence is empty or contains only values that are null.
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 Max() 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(IEnumerableTSource, FuncTSource, NullableInt64) implementation.
See Also