Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private bool IsDouble(string st)
- {
- st = st.Replace('.', separator);
- st = st.Replace(',', separator);
- NumberFormatInfo format = new NumberFormatInfo();
- format.NumberDecimalSeparator = separator.ToString();
- try
- {
- double d = Convert.ToDouble(st, format);
- return true;
- }
- catch
- {
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement