Difference Between ToString() Method and Convert.ToString() Method

Difference Between ToString() Method and Convert.ToString() Method
Rating: 5 - 1 Votes

Difference Between ToString() Method and Convert.ToString() Method

C#In the previous tutorial, we have seen how ToString() method works and how to override it.  For built-in types, it works fine but for complex types it will return their type.  There is another method which is pretty much similar to ToString() method and that is Convert.ToString().  But there is a one difference between them.  Convert.ToString() can easily handle null values and will return an empty string, but ToString() method cannot handle null values and will throw a null reference exception.  Example of both ToString() and Convert.ToString() is given below.