Skip to content

)}

SubjectBase.Subscribe(IObserver) method

Defined in

Type: SubjectBase Namespace: System.Reactive.Subjects Assembly: System.Reactive.dll

Applies to

netstandard2.0

public abstract IDisposable Subscribe(IObserver<T> observer)

Summary: Subscribes an observer to the subject.

Parameters

NameTypeDescription
observerIObserverObserver to subscribe to the subject.

Returns: IDisposable -- Disposable object that can be used to unsubscribe the observer from the subject.

Exceptions

TypeCondition
System.ArgumentNullExceptionobserver is null.