G
Guest
A little preamble
A year ago I had a very odd bug in my program, in an if clause it picked and executed the else statement even though the if clause should evaluate to true. Normally you know that it is you who are doing something wrong, but not this time. Contacting microsoft and providing them with the code, they informed me that there was a bug in VS, and that an upgrade to VS 2003 would solve the problem - they were right and thus the problem were solved. However my confidence in VS .Net had suffered.
Today - I look at a problem that is much like the above described. In the following code, the Property Pitch returns double.NaN - when debugging, the left and right side in the if clause below match, however, the else statement is executed
MY QUESTION - is this a new bug in VS .Net or should I be able write code as below
if (layer.Pitch == double.NaN
this.labelPitch.Text = "--"
else.....
A year ago I had a very odd bug in my program, in an if clause it picked and executed the else statement even though the if clause should evaluate to true. Normally you know that it is you who are doing something wrong, but not this time. Contacting microsoft and providing them with the code, they informed me that there was a bug in VS, and that an upgrade to VS 2003 would solve the problem - they were right and thus the problem were solved. However my confidence in VS .Net had suffered.
Today - I look at a problem that is much like the above described. In the following code, the Property Pitch returns double.NaN - when debugging, the left and right side in the if clause below match, however, the else statement is executed
MY QUESTION - is this a new bug in VS .Net or should I be able write code as below
if (layer.Pitch == double.NaN
this.labelPitch.Text = "--"
else.....