NaN
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Hi, In the following, double d = double.NaN; bool bd = d == double.NaN; float f = float.NaN; bool bf = f == float.NaN; both Booleans return false. What gives? Thanks, Tom
Use IsNaN[^] to determine whether a value is not a number. It is not possible to determine whether a value is not a number by comparing it to another value equal to NaN. http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemDoubleClassNaNTopic.asp[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer