Skip to content

Last/First + xxxOrDefault variants should check against IReadOnlyList, not mutable IList #122282

@marcus-sonestedt

Description

@marcus-sonestedt

See the line below:

if (source is IList<TSource> list)

IReadOnlyList has the indexer, which is the only thing this code needs, IIUC.

Thanks for an awesome framework! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions