Advertisement
tolikpunkoff

convert string to double with userdefined decimal separator

May 3rd, 2018
560
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.27 KB | None | 0 0
  1. public static double ConvertToDouble(string Value, string DecimalSeparator)
  2.         {
  3.             NumberFormatInfo format = new NumberFormatInfo();
  4.             format.NumberDecimalSeparator=DecimalSeparator;
  5.             return Convert.ToDouble(Value, format);
  6.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement