Skip to content

FirstOrNullable and similar method for struct collection #28650

Open
@Thaina

Description

@Thaina

Please add these to System.Linq.Enumerable

public static T? FirstOrNull<T>(this IEnumerable<T> items) where T : struct {}
public static T? LastOrNull<T>(this IEnumerable<T> items) where T : struct {}
public static T? ElementAtOrNull<T>(this IEnumerable<T> items,int index) where T : struct {}

// and so on

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-needs-workAPI needs work before it is approved, it is NOT ready for implementationarea-System.LinqwishlistIssue we would like to prioritize, but we can't commit we will get to it yet

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions