In .Net 2.5 I can usually get an equality comparison (==) between a value and its type default
if (myString == default(string))
However I g
It fails for the same reason as the following:
var kvp = new KeyValuePair("a","b");
var res = kvp == kvp;
The clue is in the error message, naturally. (It has nothing to do with default).
Operator '==' cannot be applied to operands of type 'System.Collections.Generic.KeyValuePair' and 'System.Collections.Generic.KeyValuePair'
The operator == is not defined for KeyValuePair.
Error messages FTW.
Happy coding.