Skip to content

,System.Action{--0})} ,System.Action{--0,System.Int32})}

Observable.ForEach(IObservable, Action) method

Defined in

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

Applies to

net8.0, net8.0-windows10.0.19041, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.0

Overloads

  • 1. public static void ForEach<TSource>(this IObservable<TSource> source, Action<TSource> onNext)
  • 2. public static void ForEach<TSource>(this IObservable<TSource> source, Action<TSource, int> onNext)

1. Overload

Deprecated

This blocking operation is no longer supported. Instead, use the async version in combination with C# and Visual Basic async/await support. In case you need a blocking operation, use Wait or convert the resulting observable sequence to a Task object and block.

Attributes: [Obsolete("This blocking operation is no longer supported. Instead, use the async version in combination with C# and Visual Basic async/await support. In case you need a blocking operation, use Wait or convert the resulting observable sequence to a Task object and block.")]

public static void ForEach<TSource>(this IObservable<TSource> source, Action<TSource> onNext)

Type parameters

NameDescription
TSource--

Parameters

NameTypeDescription
sourceIObservable--
onNextAction--

2. Overload

Deprecated

This blocking operation is no longer supported. Instead, use the async version in combination with C# and Visual Basic async/await support. In case you need a blocking operation, use Wait or convert the resulting observable sequence to a Task object and block.

Attributes: [Obsolete("This blocking operation is no longer supported. Instead, use the async version in combination with C# and Visual Basic async/await support. In case you need a blocking operation, use Wait or convert the resulting observable sequence to a Task object and block.")]

public static void ForEach<TSource>(this IObservable<TSource> source, Action<TSource, int> onNext)

Type parameters

NameDescription
TSource--

Parameters

NameTypeDescription
sourceIObservable--
onNextAction--