Difference between Convert.ToString() and ToString() method

Convert.ToString() handles null values and not throws ObjectReferenceNullException whereas ToString() does not handles the null value and throws the null exception error message.


If you don't want to get the null exception if your object is null then you have to use Convert.ToString () Method.

Comments

Popular posts from this blog

Hosting WCF in IIS(9 Steps)

Difference between IEnumerator and IEnumerable

MVC and MVVM Architecture