Table of Contents

Class Last

Namespace
Bonsai.Reactive
Assembly
Bonsai.Core.dll

Represents an operator that returns the last element of an observable sequence.

Marble diagram

If the sequence has no elements, Last will terminate with an error. This is a subtle but important difference between the Last operator and TakeLast(1), which will complete successfully when the source sequence has no elements.

public class Last : Combinator
Inheritance
Last
Inherited Members

Methods

Process<TSource>(IObservable<TSource>)

Returns the last element of an observable sequence.

public override IObservable<TSource> Process<TSource>(IObservable<TSource> source)

Parameters

source IObservable<TSource>

The sequence to take the last element from.

Returns

IObservable<TSource>

An observable sequence containing the last element of the source sequence.

Type Parameters

TSource

The type of the elements in the source sequence.