Observable.MaxBy<TSource, TKey> Method (IObservable<TSource>, Func<TSource, TKey>)

March 22, 2012

Returns the element in an observable sequence with the maximum key value.

Namespace:  Microsoft.Phone.Reactive
Assembly:  Microsoft.Phone.Reactive (in Microsoft.Phone.Reactive.dll)

public static IObservable<TSource> MaxBy<TSource, TKey>(
	this IObservable<TSource> source,
	Func<TSource, TKey> keySelector
)

Type Parameters

TSource
TKey

Parameters

source
Type: System.IObservable<TSource>
keySelector
Type: System.Func<TSource, TKey>

Return Value

Type: System.IObservable<TSource>
Returns IObservable<T>.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IObservable<TSource>. When you use instance method syntax to call this method, omit the first parameter.

Windows Phone OS

Supported in: 7.1, 7.0

Windows Phone

Show: