Nullable API #54783
Answered
by
huoyaoyuan
inputfalken
asked this question in
Q&A
Nullable API
#54783
-
Hi, I wonder if there are any plans to have methods similar to the methods available for Optional<T> in Java. By methods, I mainly think of these.
|
Beta Was this translation helpful? Give feedback.
Answered by
huoyaoyuan
Jun 27, 2021
Replies: 1 comment 1 reply
-
There's nearly no space for it in corelib. .NET mainly uses |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
inputfalken
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's nearly no space for it in corelib. .NET mainly uses
bool TryXXX(out)
pattern.If it would be added, the main benefit should be the
XXXOrDefault
series of methods. Your examples don't care about the type at all.