Convert.ToDouble( entresult.dStockPrice ) == Convert.ToDouble( ent.entprice )
false
entresult.dStockPrice == ent.entprice
运算符“==”无法应用于“decimal”和“float”类型的操作数
entresult.dStockPrice
5.27
ent.entprice
5.27
Convert.ToDouble( entresult.dStockPrice ) == Convert.ToDouble( ent.entprice )
false
Convert.ToDouble( entresult.dStockPrice )
5.27
Convert.ToDouble( ent.entprice )
5.2699999809265137
解决办法:
a-b <= 0.0001