Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string s = double.MaxValue.ToString("r");
- double d = double.Parse(s); // No exception
- private double convertToDouble(string str)
- {
- double dbl;
- if (double.TryParse(str, out dbl))
- return dbl;
- if (str == "1.79769313486232E+308")
- return double.MaxValue;
- return double.MinValue;
- }
Add Comment
Please, Sign In to add comment