Default(T) return type #2673
Unanswered
TonyValenti
asked this question in
Language Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
I noticed that it seems as though a number of attributes have been introduced to deal with the fact that default(T) is not null when T is a struct and default(T) is null when T is not a struct.
It seems to me that with the upcoming changes, it makes sense that default(class) should only be allowed if the class implements a non-null "default" operator. Anyway, just a thought.
Beta Was this translation helpful? Give feedback.
All reactions