Dela via


Qbservable.OfType<TResult> Method

Filters the elements of a queryable observable sequence based on the specified type.

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function OfType(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.OfType()
public static IQbservable<TResult> OfType<TResult>(
    this IQbservable<Object> source
)
[ExtensionAttribute]
public:
generic<typename TResult>
static IQbservable<TResult>^ OfType(
    IQbservable<Object^>^ source
)
static member OfType : 
        source:IQbservable<Object> -> IQbservable<'TResult> 
JScript does not support generic types and methods.

Type Parameters

  • TResult
    The type of result.

Parameters

Return Value

Type: System.Reactive.Linq.IQbservable<TResult>
A queryable observable sequence that contains elements from the input sequence of type TResult.

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

Reference

Qbservable Class

System.Reactive.Linq Namespace