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)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function Cast(Of TResult) ( _
source As IQbservable(Of Object) _
) As IQbservable(Of TResult)
'Usage
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
)
[ExtensionAttribute]
public:
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.
Parameters
- source
Type: System.Reactive.Linq.IQbservable<Object>
The source sequence.
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 .