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

AnimationExtender AJAX Control

MVC and MVVM Architecture

Difference between IEnumerator and IEnumerable