The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

Qbservable.Sample<TSource, TSample>(IQbservable<TSource>, IObservable<TSample>)

Qbservable.Sample<TSource, TSample> Method (IQbservable<TSource>, IObservable<TSample>)

Samples the queryable observable sequence at sampling ticks with the specified source and sampler.

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


<ExtensionAttribute> _
Public Shared Function Sample(Of TSource, TSample) ( _
    source As IQbservable(Of TSource), _
    sampler As IObservable(Of TSample) _
) As IQbservable(Of TSource)
Dim source As IQbservable(Of TSource)
Dim sampler As IObservable(Of TSample)
Dim returnValue As IQbservable(Of TSource)

returnValue = source.Sample(sampler)
public static IQbservable<TSource> Sample<TSource, TSample>(
    this IQbservable<TSource> source,
    IObservable<TSample> sampler
generic<typename TSource, typename TSample>
static IQbservable<TSource>^ Sample(
    IQbservable<TSource>^ source, 
    IObservable<TSample>^ sampler
static member Sample : 
        source:IQbservable<'TSource> * 
        sampler:IObservable<'TSample> -> IQbservable<'TSource> 
JScript does not support generic types and methods.

Type Parameters

  • TSource
    The type of source.

  • TSample
    The type of sample.


Return Value

Type: System.Reactive.Linq.IQbservable<TSource>
The sampled queryable observable sequence.

Usage Note

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

See Also


Qbservable Class

Sample Overload

System.Reactive.Linq Namespace