Converts Decimal to string using the specified culture-specific format information.
using System;
using System.Globalization;
class MainClass
{
publicstaticvoid Main()
{
decimal value = -16325.62m;
// Display value using the invariant culture.
Console.WriteLine(value.ToString(CultureInfo.InvariantCulture));
// Display value using the en-GB culture.
Console.WriteLine(value.ToString(CultureInfo.CreateSpecificCulture("en-GB")));
// Display value using the de-DE culture.
Console.WriteLine(value.ToString(CultureInfo.CreateSpecificCulture("de-DE")));
}
}
/*
-16325.62
-16325.62
-16325,62
*/