Nullable<T>::ToString Method ()

 

Returns the text representation of the value of the current Nullable<T> object.

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

public:
virtual String^ ToString() override

Return Value

Type: System::String^

The text representation of the value of the current Nullable<T> object if the HasValue property is true, or an empty string ("") if the HasValue property is false.

The ToString property returns the string yielded by calling the ToString property of the object returned by the Value property.

The following code example displays the value of the current Nullable<T> object.

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: