ToString Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Converts the numeric value of this instance to its equivalent string representation.

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

public override string ToString()

Return Value

Type: System..::..String
The string representation of the value of this instance, which consists of a sequence of digits ranging from 0 to 9, without a sign or leading zeros.

The return value is formatted with the general numeric format specifier ("G") and the NumberFormatInfo object for the current culture. The string representation of the UInt16 value consists of a sequence of digits ranging from 0 to 9 without leading zeros.

To define the formatting of the 16-bit unsigned integer value's string representation, call the ToString(String) method.

Show: