0
if you divide two int then the result is always integer even if you save it in Decimal.
int A = 32;
int B = 36;
decimal result = A / B;
then the result = 0
but if you use
decimal A = 32;
decimal B = 36;
decimal result = A / B;
then the result = 0.8888888888
Posted on 7:11 AM by Softminer and filed under
C#
if you divide two int then the result is always integer even if you save it in Decimal.
int A = 32;
int B = 36;
decimal result = A / B;
then the result = 0
but if you use
decimal A = 32;
decimal B = 36;
decimal result = A / B;
then the result = 0.8888888888
Post a Comment