有MyDataSet myDataSet
withMyTable
列string MyNumber
(名称已更改)。然后在表中添加一行(现有代码):
decimal d = GetSum();
myDataSet.MyTable.AddMyTableRow(d.ToString("F2"));
现在我必须得到那个十进制数。但是FormatException
当我尝试时它会抛出
decimal.Parse(myDataSet.MyTable[0].MyNumber);
// or
decimal.Parse(myDataSet.MyTable[0].MyNumber, CultureInfo.InvariantCulture);
//or
decimal.Parse(myDataSet.MyTable[0].MyNumber, CultureInfo.CurrentCulture)
//or
anything else..