Why does (Guid?)null ?? default return empty guid

37 views Asked by At

Output from VS Immediate Window

default(Guid?)
=> null
(Guid?)null == default
=> true
(Guid?)null ?? default
=> {00000000-0000-0000-0000-000000000000}

I expected the last to be null and not Guid.Empty. So why is it this way?

0

There are 0 answers