Class Count
Represents an operator that returns the count of the number of elements in an observable sequence.
The Count
operator collects all the values from the source sequence and emits a single value representing the total number of items. The single result value is emitted only when the source sequence terminates successfully.
Example
Use Count
to report the total count of elements at the end of a sequence.
Alternative
Use ElementIndex
instead to continuously track the number of elements in the sequence.
public class Count : Combinator<int>
- Inheritance
-
Count
- Inherited Members
Methods
- Process<TSource>(IObservable<TSource>)
Returns the count of the number of elements in an observable sequence.