Method Replace
Replace<TSource>(IAsyncEnumerable<TSource>, int, TSource)
Replaces a single value in a sequence at a specified index with the given replacement value.
Declaration
public static IAsyncEnumerable<TSource> Replace<TSource>(this IAsyncEnumerable<TSource> source, int index, TSource value)
Parameters
Type | Name | Description |
---|---|---|
IAsyncEnumerable<TSource> | source | The source sequence. |
int | index | The index of the value to replace. |
TSource | value | The replacement value to use at |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TSource> | A sequence with the original values from |
Type Parameters
Name | Description |
---|---|
TSource | Type of item in the sequence |
Remarks
This operator evaluates in a deferred and streaming manner.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Replace<TSource>(IAsyncEnumerable<TSource>, Index, TSource)
Replaces a single value in a sequence at a specified index with the given replacement value.
Declaration
public static IAsyncEnumerable<TSource> Replace<TSource>(this IAsyncEnumerable<TSource> source, Index index, TSource value)
Parameters
Type | Name | Description |
---|---|---|
IAsyncEnumerable<TSource> | source | The source sequence. |
Index | index | The index of the value to replace. |
TSource | value | The replacement value to use at |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TSource> | A sequence with the original values from |
Type Parameters
Name | Description |
---|---|
TSource | Type of item in the sequence |
Remarks
This operator evaluates in a deferred and streaming manner.
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|