G
Guest
Hello -
float r;
r = (int)(Number * Math.Pow(10, Decimals) + 0.5) / Math.Pow(10, Decimals);
Error:
Operator '*' cannot be applied to operands of type 'decimal' and 'double'
//data sample
int Decimals = 2;
Decimal Number = 123.258; //has to be decimal
What's happen here?
float r;
r = (int)(Number * Math.Pow(10, Decimals) + 0.5) / Math.Pow(10, Decimals);
Error:
Operator '*' cannot be applied to operands of type 'decimal' and 'double'
//data sample
int Decimals = 2;
Decimal Number = 123.258; //has to be decimal
What's happen here?