SuperLinq SuperLinq
SuperLinq SuperLinq
DocFX + Singulink = ♥

Search Results for

    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 index.

    Returns
    Type Description
    IAsyncEnumerable<TSource>

    A sequence with the original values from source, except for position index which has the value value.

    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

    source is null.

    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 index.

    Returns
    Type Description
    IAsyncEnumerable<TSource>

    A sequence with the original values from source, except for position index which has the value value.

    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

    source is null.

    © SuperLinq Authors. All rights reserved.