What's the culture on the current thread (Culture.CurrentCulture)?
Decimal.Parse is culture dependent. So, for example, if your machine is
configured with a French or German culture, Decimal.Parse will require a
comma as decimal separator.
You can use Decimal.Parse(str, NumberFormatInfo.InvariantInfo) to get
culture independent parsing.
BTW, this a parsing problem, not a casting error.
Bruno.
"Bryce" <an*******@discussions.microsoft.com> a écrit dans le message de
news:21**********************************@microsof t.com...
First off, I hope I am posting this in the correct place.
Convert.ToDecimal() is throwing a FormatException, as is Decimal.Parse()
if I send in the string "000063.27" or "+000063.27". I tried removing the
zeroes (via substring) and this doesn't work either.
Any ideas?
Thanks in advance.