Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor GetElementOrDefault #35

Closed
nnikolopoulos opened this issue Oct 5, 2022 · 0 comments · Fixed by #212
Closed

Refactor GetElementOrDefault #35

nnikolopoulos opened this issue Oct 5, 2022 · 0 comments · Fixed by #212
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@nnikolopoulos
Copy link
Contributor

nnikolopoulos commented Oct 5, 2022

suggestion:
static T GetValidElement(this IList array, int index)
replacing
static T GetElementOrDefault(this ICollection array, int index)

Because the default(T) is something else than the first/last element.

What about "static T GetValidElement(this IList array, int index)"?

Originally posted by @sbusato in #33 (comment)

@nnikolopoulos nnikolopoulos changed the title What about "static T GetValidElement<T>(this IList<T> array, int index)" instead of "static T GetElementOrDefault<T>(this ICollection<T> array, int index)" What about "static T GetValidElement<T>(this IList<T> array, int index)" instead of "static T GetElementOrDefault<T>(this ICollection<T> array, int index)"? Oct 5, 2022
@dcolleoni dcolleoni changed the title What about "static T GetValidElement<T>(this IList<T> array, int index)" instead of "static T GetElementOrDefault<T>(this ICollection<T> array, int index)"? Refactor GetElementOrDefault Nov 15, 2022
@dcolleoni dcolleoni added this to the v1.1.x milestone Jan 19, 2023
@dcolleoni dcolleoni added the enhancement New feature or request label Jan 19, 2023
@nnikolopoulos nnikolopoulos linked a pull request Feb 7, 2023 that will close this issue
@nnikolopoulos nnikolopoulos self-assigned this Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants