Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

Observable.CombineLatest<TFirst, TSecond, TResult> Method

Merges two observable sequences into one observable sequence by using the selector function whenever one of the observable sequences produces an element.

Namespace:  System.Reactive.Linq
Assembly:  System.Reactive (in System.Reactive.dll)

public static IObservable<TResult> CombineLatest<TFirst, TSecond, TResult>(
	this IObservable<TFirst> first,
	IObservable<TSecond> second,
	Func<TFirst, TSecond, TResult> resultSelector

Type Parameters


The first type.


The second type.


The type of result.


Type: System.IObservable<TFirst>
The first observable source.
Type: System.IObservable<TSecond>
The second observable source.
Type: System.Func<TFirst, TSecond, TResult>
The function to invoke whenever either of the sources produces an element.

Return Value

Type: System.IObservable<TResult>
An observable sequence containing the result of combining elements of both sources using the specified result selector function.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IObservable<TFirst>. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.103) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.103).
© 2015 Microsoft