I have an input string in the following format: 12.34
When I call this line:
db.AddInParameter(insertMessageDetailCommand, "AttachmentSize", System.Data.SqlDbType.Decimal , Convert.ToDecimal(this.messageEnvelope.EnvelopeInfo.AttachmentSize));
I get an input string not in the correct format. The server I am deploying to have regional settings with a "," separator for decimals. But other production servers could have "." separators.
How can I pass this string value : 12.34 to this function so that it doesn't break, and its generic enough to withstand any regional setting you throw at it?