SuperLinq SuperLinq
SuperLinq SuperLinq
DocFX + Singulink = ♥

Search Results for

    Method Take

    Take<TSource>(IEnumerable<TSource>, Range)

    Returns a specified range of contiguous elements from a sequence.

    Declaration
    [Obsolete("This method has been implemented by the framework.")]
    public static IEnumerable<TSource> Take<TSource>(IEnumerable<TSource> source, Range range)
    Parameters
    Type Name Description
    IEnumerable<TSource> source

    The sequence to return elements from.

    Range range

    The range of elements to return, which has start and end indexes either from the start or the end.

    Returns
    Type Description
    IEnumerable<TSource>

    An IEnumerable<T> that contains the specified range of elements from the source sequence.

    Type Parameters
    Name Description
    TSource

    The type of the elements of source.

    Remarks

    Take<TSource>(IEnumerable<TSource>, Range) enumerates source and yields elements whose indices belong to the specified range.

    This method is implemented by using deferred execution.

    Exceptions
    Type Condition
    ArgumentNullException

    source is null.

    © SuperLinq Authors. All rights reserved.