Can not assign 'Convert.ToDouble(row("Amount").ToString)

Hi,

Which do you need to handle “24.28-”, as positive or negative?

If positive

Convert.ToDouble(row("Amount").ToString.TrimEnd("-"c)) +dbSumAmount

If negative

Convert.ToDouble(System.Text.RegularExpressions.Regex.Replace(row("Amount").ToString,"^([.,\d]+)(-)?$","$2$1")) +dbSumAmount

Hope the above helps you.

Regards,

1 Like