Skip to content

)} ,System.Linq.Expressions.Expression})}

Qbservable.Any(IQbservable) method

Defined in

Type: Qbservable Namespace: System.Reactive.Linq Assembly: System.Reactive.dll

Applies to

netstandard2.0

Overloads

  • 1. public static IQbservable<bool> Any<TSource>(this IQbservable<TSource> source)
  • 2. public static IQbservable<bool> Any<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, bool>> predicate)

1. Overload

public static IQbservable<bool> Any<TSource>(this IQbservable<TSource> source)

Summary: Determines whether an observable sequence contains any elements.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
source[IQbservable](#An observable sequence to check for non-emptiness.

Returns: IQbservable -- An observable sequence containing a single element determining whether the source sequence contains any elements.

Remarks

The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.

2. Overload

public static IQbservable<bool> Any<TSource>(this IQbservable<TSource> source, Expression<Func<TSource, bool>> predicate)

Summary: Determines whether any element of an observable sequence satisfies a condition.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
source[IQbservable](#An observable sequence whose elements to apply the predicate to.
predicateExpression>A function to test each element for a condition.

Returns: IQbservable -- An observable sequence containing a single element determining whether any elements in the source sequence pass the test in the specified predicate.

Remarks

The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or predicate is null.