Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Globalization; // подключаем это
- namespace les6
- {
- class Program
- {
- static void Main(string[] args)
- {
- // региональные настройки формата
- string str = "1,9";
- NumberFormatInfo numberFormatInfo = new NumberFormatInfo()
- {
- NumberDecimalSeparator = ",",
- };
- double a = Convert.ToDouble(str, numberFormatInfo);
- Console.WriteLine(a);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement