Equality with Double.NaN
- by chris
I have the following code...
if (Price_Foreign != Double.NaN)
{
output.Append(spacer);
output.Append(String.Format("{0,-10:C} USD",Price_Foreign));
}
Which outputs:
NaN USD
What gives?
I'm using Double.NaN to indicate that the value doesn't exist, and shouldn't be output.