Operator '*' cannot be applied to operands of type 'double' and 'decimal'

前端 未结 4 2017
北荒
北荒 2020-12-07 00:39

I get this message in my program but i don\'t know how to fix it i have search on the net but don\'t find any thing that can help me.

private double Price;
p         


        
4条回答
  •  春和景丽
    2020-12-07 01:08

    You need to cast one to the other. My guess is that both Price and all of your VAT rates should really be decimal - double isn't (usually) appropriate for dealing with any type of monetary values.

提交回复
热议问题