Zip(TFirst, TSecond, TResult) Method (IObservable(TFirst), IObservable(TSecond), Func(TFirst, TSecond, TResult))

Observable.Zip(Of TFirst, TSecond, TResult) Method (IObservable(Of TFirst), IObservable(Of TSecond), Func(Of TFirst, TSecond, TResult))

Merges two observable sequences into one observable sequence by combining their elements in a pairwise fashion.

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

<ExtensionAttribute> _
Public Shared Function Zip(Of TFirst, TSecond, TResult) ( _
	first As IObservable(Of TFirst), _
	second As IObservable(Of TSecond), _
	resultSelector As Func(Of TFirst, TSecond, TResult) _
) As IObservable(Of TResult)
Dim first As IObservable(Of TFirst)
Dim second As IObservable(Of TSecond)
Dim resultSelector As Func(Of TFirst, TSecond, TResult)
Dim returnValue As IObservable(Of TResult)

returnValue = first.Zip(second, resultSelector)

Type Parameters


The first type.


The second type.


The type of result.


Type: System.IObservable(Of TFirst)
The first observable source.
Type: System.IObservable(Of TSecond)
The second observable source.
Type: System.Func(Of TFirst, TSecond, TResult)
The function to invoke for each consecutive pair of elements from the first and second source.

Return Value

Type: System.IObservable(Of TResult)
An observable sequence containing the result of pairwise combining the elements of the first and second source 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(Of TFirst). When you use instance method syntax to call this method, omit the first parameter. For more information, see or
© 2015 Microsoft