I see everywhere constructions like:
int? myVar = null;
string test = myVar.HasValue ? myVar.Value.ToString() : string.Empty;
Why not use
I know, long after it was relevant, but ... I suspect it is because for nullable types like int? the .ToString() method does not allow you to use format strings. See How can I format a nullable DateTime with ToString()? . Perhaps in the original code, there was a format string in .ToString(), or perhaps the coder forgot that .ToString() without the format string was still available on nullable types.