To avoid this problem, you can define a complex type to wrap the value type and set the complex type to be null to indicate a null reference.
为了避免这个问题的出现,您可以定义复合类型来封装数值类型,并将这个复合类型置为空来表示空引用。
That means a reference type can have a null pointer, but a value type cannot have a null value.
这意味着引用类型可能有空指针,但是数值类型不能有空值。
应用推荐