daily pastebin goal

convert string to double with userdefined decimal separator

tolikpunkoff May 3rd, 2018 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand