-
Hi I had a strange finding today that caused me to break some test cases of mine, I was unware of this and I was wondering whether this is by intention. So basically if you do this Console.WriteLine(((int?)null) ?? default) it will write "0", as the default is default(int) and not default(int?). Is this a bug or what am I missing here? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
This is the expected behavior according to the spec (edited for brevity):
In this case, |
Beta Was this translation helpful? Give feedback.
-
I also want to point out that |
Beta Was this translation helpful? Give feedback.
This is the expected behavior according to the spec (edited for brevity):
In this case,
A
isint?
andA₀
…