标签: c# .net-core
我的数据类型为小数。
我要执行以下操作:
if(decimalData % 0.25 !=0) { //do some manipulation }
但这给了我上面的错误。
答案 0 :(得分:2)
以下应该可以帮助您使用小数点。
if(decimalData % 0.25M !=0) { //do some manipulation }
不带后缀或带d或D后缀的“真实文字”的类型为double。您可以在suffix上阅读更多