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


Qbservable.Cast<TResult> Method

Converts the elements of an observable sequence to the specified type.

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


<ExtensionAttribute> _
Public Shared Function Cast(Of TResult) ( _
    source As IQbservable(Of Object) _
) As IQbservable(Of TResult)
Dim source As IQbservable(Of Object)
Dim returnValue As IQbservable(Of TResult)

returnValue = source.Cast()
public static IQbservable<TResult> Cast<TResult>(
    this IQbservable<Object> source
generic<typename TResult>
static IQbservable<TResult>^ Cast(
    IQbservable<Object^>^ source
static member Cast : 
        source:IQbservable<Object> -> IQbservable<'TResult> 
JScript does not support generic types and methods.

Type Parameters

  • TResult
    The type of result.


Return Value

Type: System.Reactive.Linq.IQbservable<TResult>
An observable sequence that contains each element of the source sequence converted to the specified type.

Usage Note

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

See Also


Qbservable Class

System.Reactive.Linq Namespace