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

Add IsBetween utility method to check whether the ordinal of an enum us between two numeric values #31

Closed
abjerner opened this issue Jun 9, 2022 · 0 comments

Comments

@abjerner
Copy link
Member

abjerner commented Jun 9, 2022

Usage could be something like:

HttpStatusCode status = HttpStatusCode.Created;

if (EnumUtils.IsBetween(status, 200, 299)) {

    // HTTP status code indicates a successful response

}
@abjerner abjerner self-assigned this Jun 9, 2022
abjerner added a commit that referenced this issue Jul 4, 2022
…sses

Similar to elsewhere in the package, roughly the same functionality is implemented as both static utility methods and extensions methods.

Implements #31
@abjerner abjerner closed this as completed Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant