为什么asp.net C#Decimal类型不能获得分数?

时间:2018-01-11 00:14:28

标签: c# mysql asp.net decimal

我有一个MySQL数据库,其列数量为Decimal(10,2)。 我使用LINQ将记录插入数据库。

myTable table = new myTable();
int intAmount = 106564; // I received the data in this format. It is $1,065.64
myTable.Amount = (intAmount / 100); // Why it sets the value to 1065 instead of 1065.64?

C#Decimal不支持十进制值吗?!?

0 个答案:

没有答案