I am trying to determine cause of ‘Null reference exception’ on published remote site. So, I can’t debug it directly and can operate only with logs. So my question is:
Is it possible, that .ToString() method of any of built-in .NET types returns null?
EDIT:
I suspect DateTime.ToString(invariantCulture) method with badly constructed culture settings.
I don’t know of any types where it does. It’s not impossible – it would certainly be easy to write your own type which behaved like that – but I doubt any of the framework types do.
Do you have any particular types in mind?
EDIT:
DateTime.ToString(invariantCulture)should never return null – the culture settings should be irrelevant, if you’ve really got the invariant culture.