Nullable<T>Explicit Conversion (Nullable<T> to T)

 
equivalentCodeEntityP:System.Nullable`1.Value

Defines an explicit conversion of a Nullable<T> instance to its underlying value.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

public:
static explicit operator T (
	Nullable<T> value
)

Parameters

value
Type: System::Nullable<T>

A nullable value.

Return Value

Type: T

The value of the Value property for the value parameter.

This operator supports the explicit conversion of the current Nullable<T> instance to type T, the type of Value. The syntax for such explicit conversions is language-dependent. You may also be able to perform the conversion by calling the Convert::ChangeType method.

The Explicit(Nullable<T> to T) operator enables code such as the following, which converts a Nullable(Of Int32) value to an Int32 value.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: