我有问题将此字符串转换为小数。我试图按照这里的文档没有运气:Decimal.TryParse Method使用Decimal.TryParse转换蒙面货币字符串
string stringVal = "-(3434343434.00)";
NumberStyles style = NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands |
NumberStyles.AllowParentheses | NumberStyles.AllowLeadingSign;
CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");
decimal value;
bool parseSuccess = decimal.TryParse(stringVal, style, culture, out value);
parseSuccess返回false。
'decimal.TryParse'不是表达式计算器。给它一个数字。 –