Closed
Description
Background and motivation
Similarly to #71309, would it be possible to add [MaybeNullWhen(false)] annotation to INumberBase<> interface?
currently we have
static abstract bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out TSelf result);
static abstract bool TryParse(ReadOnlySpan<char> s, NumberStyles style, IFormatProvider? provider, out TSelf result);
API Proposal
static abstract bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out TSelf result);
static abstract bool TryParse(ReadOnlySpan<char> s, NumberStyles style, IFormatProvider? provider, [MaybeNullWhen(false)] out TSelf result);
API Usage
Like before but with nullability info when implemented by classes
Alternative Designs
No response
Risks
No response