-
-
Notifications
You must be signed in to change notification settings - Fork 281
Closed
Description
It would be nice if there was a dedicated overload for value types, like:
public static T MissingValue<T>(Nullable<T> input, [CallerArgumentExpression("input")] string? parameterName = null)
where T: struct
{
if (!input.HasValue) throw new ArgumentNullException(parameterName);
return input.Value;
}This way we guarantee that return type has a value.
What do you think? If you agree, I will submit a PR (with the proper format of course and usual behavior).
Metadata
Metadata
Assignees
Labels
No labels