Difference between Convert.tostring() and .tostring().
I got many difference in web.But what is major reason?
Difference between Convert.tostring() and .tostring().
I got many difference in web.But what is major reason?
Calling ToString()
on an object presumes that the object is not null (since an object needs to exist to call an instance method on it). Convert.ToString(obj)
doesn't need to presume the object is not null (as it is a static method on the Convert class), but instead will return String.Empty
if it is null.