Created
June 12, 2022 08:15
-
-
Save yohey03518/84157505e6d89aa2203213a1353f1f79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float num_float = 12345.00f; | |
double num_double = 12345.00; | |
decimal num_decimal = 12345.00m; | |
Console.WriteLine("Current Culture (default) : " + Thread.CurrentThread.CurrentCulture.Name); | |
Console.WriteLine("num_float.ToString(\"F\"): " + num_float.ToString("F")); | |
Console.WriteLine("num_double.ToString(\"F\"): " + num_double.ToString("F")); | |
Console.WriteLine("num_decimal.ToString(\"F\"): " + num_decimal.ToString("F")); | |
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); | |
Console.WriteLine("Current Culture: " + Thread.CurrentThread.CurrentCulture.Name); | |
Console.WriteLine("num_float.ToString(\"F\"): " + num_float.ToString("F")); | |
Console.WriteLine("num_double.ToString(\"F\"): " + num_double.ToString("F")); | |
Console.WriteLine("num_decimal.ToString(\"F\"): " + num_decimal.ToString("F")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment