System.Enum
is a reference type, but any specific enum type is a value type. In the same way, System.ValueType
is a reference type, but all types inheriting from it (other than System.Enum
) are value types.
So if you have an enum Foo
and you want a nullable property, you need the property type to be Foo?
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…