textBoxResult.Text = value1.ToString();
textBoxResult.Text = value1.ToString("N0");
double dblValue = -12445.6789; Console.WriteLine(dblValue.ToString("N", CultureInfo.InvariantCulture)); // Displays -12,445.68 Console.WriteLine(dblValue.ToString("N1", CultureInfo.CreateSpecificCulture("sv-SE"))); // Displays -12 445,7
textBoxResult.Text = value1.ToString("F0");
textBoxResult.Text = textBoxResult.Text.Replace(",","");
var myvalue = 1000.50; //defult regional settings //"En-us" Console.WriteLine(myvalue.ToString("F1").Replace(",", "")); //result: 1000.5 CultureInfo prs = new CultureInfo("Pl-pl"); //Polish regional stettings Console.WriteLine(myvalue.ToString("F1", prs).Replace(",", "")); //result: 10005
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)