Skip to content

Off by one error in some Skip/Take combinations. #16679

@JonHanna

Description

@JonHanna

The problem reported in #16669 can also happen with IList<T> sources and the results of Select() on such sources.

E.g. the following fails:

Assert.Equal(new[] { 6 }, new[] { 1, 2, 3, 4 }.Select(i => i * 2).Take(3).Skip(2));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions