T
Tim Osborne
I want to know if a call to Convert.Int32 can handle a Culture specific
string.
I have the following code:
string sText = "111,111,111";
int i;
i = Convert.Int32( sText );
This throws an exception.
So I try adding the following:
CultureInfo ci = Thread.CurrentThread.CurrentCulture;
i = Convert.Int32( sText, ci.NumericInfo );
This also throws.
Do I have to remove the Thousands Separator character myself?
string.
I have the following code:
string sText = "111,111,111";
int i;
i = Convert.Int32( sText );
This throws an exception.
So I try adding the following:
CultureInfo ci = Thread.CurrentThread.CurrentCulture;
i = Convert.Int32( sText, ci.NumericInfo );
This also throws.
Do I have to remove the Thousands Separator character myself?