------解决方案-------------------- int i = 1,j = 2; double k=i*1.0/j;
------解决方案--------------------
C# code
int i=1;
int k =2;
double result = (double)i/(double)k
double result = 1d/2d;
------解决方案-------------------- int i=1; int j=2 double result = Convert.ToDouble(i)/j;