How to use Convert.ChangeType() when conversionType is decimal and input is “40.00”

The decimal point might not be represented by the period character in your current culture.

In general, when performing culture-invariant conversions, it’s best to specify CultureInfo.InvariantCulture as the IFormatProvider argument to the method:

(decimal) Convert.ChangeType(a, typeof(decimal), CultureInfo.InvariantCulture);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)