T
Tina
This C# code produces a value of 0.0 in myAspectRatio....
int myWidth = 1200;
int myHeight = 1600;
double myAspectRatio = 0.0;
myAspectRatio = myWidth / myHeight;
This VB code produces a value of .75 (the correct answer) in myAspectRatio..
Dim myWidth As Integer = 1200
Dim myHeight As Integer = 1600
Dim myAspectRatio As Double = 0.0
myAspectRatio = myWidth / myHeight
Why does the C# code produce the incorrect answer of 0.0?
Thanks,
T
int myWidth = 1200;
int myHeight = 1600;
double myAspectRatio = 0.0;
myAspectRatio = myWidth / myHeight;
This VB code produces a value of .75 (the correct answer) in myAspectRatio..
Dim myWidth As Integer = 1200
Dim myHeight As Integer = 1600
Dim myAspectRatio As Double = 0.0
myAspectRatio = myWidth / myHeight
Why does the C# code produce the incorrect answer of 0.0?
Thanks,
T