Answer:
object.ToString() give run time error if object value is null, whereas Convert.ToString(object) does not give any error in case of object value is null;
Example:
object obj=null;
string str=obj.ToTsirng(); //it will give run time error
string str1=Convert.ToString(obj); // it will run, not give any error
Asked In: Many Interviews |
Alert Moderator