Qbservable.CombineLatest<TFirst, TSecond, TResult> Method

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

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

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

Type Parameters

TFirst

The first type.

TSecond

The second type.

TResult

The type of result.

Parameters

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

Return Value

Type: System.Reactive.Linq.IQbservable<TResult>
A queryable 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 IQbservable<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).aspx or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.103).aspx.
Show: