C# UInt64 ToString(IFormatProvider)
Description
UInt64 ToString(IFormatProvider)
converts the numeric
value of this instance to its equivalent string representation using the
specified culture-specific format information.
Syntax
UInt64.ToString(IFormatProvider)
has the following syntax.
public string ToString(
IFormatProvider provider
)
Parameters
UInt64.ToString(IFormatProvider)
has the following parameters.
provider
- An object that supplies culture-specific formatting information.
Returns
UInt64.ToString(IFormatProvider)
method returns The string representation of the value of this instance as specified by provider.
Example
The following example formats a 64-bit signed integer value by using several format providers, including one for the invariant culture.
//from w w w . j ava 2 s. c o m
using System;
using System.Globalization;
public class Example
{
public static void Main()
{
CultureInfo[] ci = { new CultureInfo("en-US"),
new CultureInfo("fr-FR"),
CultureInfo.InvariantCulture };
ulong value = 12345678;
Console.WriteLine(value.ToString(ci[0]));
Console.WriteLine(value.ToString(ci[1]));
Console.WriteLine(value.ToString(ci[2]));
}
}
The code above generates the following result.