So, I plunged into LinqPad and noticed something strange, I get the same result in the test code of the Visual Studio Unit Tests.
I played with all the different TryParse for numeric data types. During this, I noticed that double.TryParse acts a little differently than the rest.
For example:
var doubleStr = double.MinValue.ToString();
double result;
var result = double.TryParse(doubleStr, out result);
All other data types with MinValue do not have this problem:
var floatStr = float.MinValue.ToString();
float result2;
float.TryParse(floatStr, out result2);
Does any body know why double is the only one that is false to parse the string version of the MinValue property back to the actual double?
I do not see why this is different from the hand. Maybe I'm missing something.
source
share