INullableValue
Contents |
The System.INullableValue interface defines the fundamental value and existence properties for nullable types. However, it has been removed from .NET 2.0; because, nullables are now an intrinsic type in the CLR.
[edit]
Syntax
[edit]
Declaration syntax
[ComVisibleAttribute(true)] public interface INullableValue
[edit]
Method syntax
The INullableValue interface defines the following methods:
- The
HasValuemethod indicates whether a nullable type has a defined value.
bool HasValue { get; }
- The
Valuemethod gets the value of the nullable type.
Object Value { get; }
[edit]
INullableValue work around
Instead, code like the following may be used:
if (t.IsGenericType() && (t.GetGenericTypeDefinition() == typeof(System.Nullable<>)) { }
|

