I am trying to parse or convert a string to decimal in C#.
I need to be able to parse strings like,
$123,345,676.8999 to its equivalent 123345676.90.
You can use decimal.TryParse to perform the parsing -- the link has some samples on how the parsing works.
Very simple answer: use Decimal.Parse()
Try this:
var val = double.Parse("$123,345,676.8999", NumberStyles.AllowThousands | NumberStyles.AllowDecimalPoint | NumberStyles.AllowCurrencySymbol);
val = Math.Round(val, 2);