Skip to content

,System.Func{--0,System.Boolean})} ,System.Func{--0,System.Int32,System.Boolean})}

Observable.SkipWhile(IObservable, Func) method

Defined in

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

Applies to

netstandard2.0

Overloads

  • 1. public static IObservable<TSource> SkipWhile<TSource>(this IObservable<TSource> source, Func<TSource, bool> predicate)
  • 2. public static IObservable<TSource> SkipWhile<TSource>(this IObservable<TSource> source, Func<TSource, int, bool> predicate)

1. Overload

public static IObservable<TSource> SkipWhile<TSource>(this IObservable<TSource> source, Func<TSource, bool> predicate)

Summary: Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableAn observable sequence to return elements from.
predicateFuncA function to test each element for a condition.

Returns: IObservable -- An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or predicate is null.

2. Overload

public static IObservable<TSource> SkipWhile<TSource>(this IObservable<TSource> source, Func<TSource, int, bool> predicate)

Summary: Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. The element's index is used in the logic of the predicate function.

Type parameters

NameDescription
TSourceThe type of the elements in the source sequence.

Parameters

NameTypeDescription
sourceIObservableAn observable sequence to return elements from.
predicateFuncA function to test each element for a condition; the second parameter of the function represents the index of the source element.

Returns: IObservable -- An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource or predicate is null.