Skip to content

Applies to

netstandard2.0

public static IObservable<TResult> Cast<TResult>(this IObservable<object> source)

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

Type parameters

NameDescription
TResultThe type to convert the elements in the source sequence to.

Parameters

NameTypeDescription
sourceIObservableThe observable sequence that contains the elements to be converted.

Returns: IObservable -- An observable sequence that contains each element of the source sequence converted to the specified type.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.