Observable.Range(int, int) method¶
Defined in
Type: Observable
Namespace: System.Reactive.Linq
Assembly: System.Reactive.dll
Applies to
netstandard2.0
Overloads¶
- 1.
public static IObservable<int> Range(int start, int count) - 2.
public static IObservable<int> Range(int start, int count, IScheduler scheduler)
1. Overload¶
public static IObservable<int> Range(int start, int count)
Summary: Generates an observable sequence of integral numbers within a specified range.
Parameters
| Name | Type | Description |
|---|---|---|
start | int | The value of the first integer in the sequence. |
count | int | The number of sequential integers to generate. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentOutOfRangeException | count is less than zero. -or- start + count - 1 is larger than MaxValue. |
2. Overload¶
public static IObservable<int> Range(int start, int count, IScheduler scheduler)
Summary: Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to send out observer messages.
Parameters
| Name | Type | Description |
|---|---|---|
start | int | The value of the first integer in the sequence. |
count | int | The number of sequential integers to generate. |
scheduler | [IScheduler](# | Scheduler to run the generator loop on. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentOutOfRangeException | count is less than zero. -or- start + count - 1 is larger than MaxValue. |
| System.ArgumentNullException | scheduler is null. |