3 ms·
The proper way to do this is using something like TryParse() and ToString() and to handle the case of failing to parse the string as a number and maybe even spe
by danbruc 12y ago
The proper way to do this is using something like TryParse() and ToString() and to handle the case of failing to parse the string as a number and maybe even specifying the locale for both operations. If you are absolutely sure that parsing can not fail you can use Parse() and omit the error handling.