-
Notifications
You must be signed in to change notification settings - Fork 387
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
UnitParser: fix the nullability of the Parse / TryParse overloads #1445
Labels
Comments
Oh I just realized this also the case for the static method on the quantities (e.g. |
Added it |
angularsen
added a commit
that referenced
this issue
Dec 15, 2024
(UnitParser, QuantityParser, Quantity) fixes #1445 --------- Co-authored-by: Andreas Gullberg Larsen <[email protected]>
Fixed by #1446 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can we add this to #1200
public Enum Parse(string? unitAbbreviation, Type unitType, IFormatProvider? formatProvider = null)
:unitAbbreviation
should be non-nullable..public bool TryParse<TUnitType>(string unitAbbreviation, out TUnitType unit) where TUnitType : struct, Enum
:unitAbbreviation
should be nullablepublic bool TryParse(string unitAbbreviation, Type unitType, [NotNullWhen(true)] out Enum? unit)
:unitAbbreviation
should be nullableThe text was updated successfully, but these errors were encountered: