How is Nullable<T> different from a similar custom C# struct?
问题 In Nullable micro-optimizations, part one, Eric mentions that Nullable<T> has a strange boxing behaviour that could not be achieved by a similar user-defined type. What are the special features that the C# language grants to the predefined Nullable<T> type? Especially the ones that could not be made to work on a MyNullable type. Of course, Nullable<T> has special syntactic sugar T? , but my question is more about semantics. 回答1: What I was getting at is: there is no such thing as a boxed