UInt32::ToString Method (IFormatProvider)
Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.
Assembly: mscorlib (in mscorlib.dll)
- Type: System::IFormatProvider
An object that supplies culture-specific formatting information.
Return ValueType: 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.
This instance is formatted with the general numeric format specifier ("G"). The string representation of the UInt32 value consists of a sequence of digits ranging from 0 to 9 without leading zeros.
The provider parameter is an IFormatProvider implementation. Its GetFormat method returns a NumberFormatInfo object that provides culture-specific formatting information. However, none of the properties of the NumberFormatInfo are used when formatting with the general numeric format specifier ("G").
The following example formats a 16-bit signed integer value by using several format providers, including one for the invariant culture. The output from the example illustrates that the formatted string returned by the method is the same regardless of the format provider.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.