Difference Between .ToString() and Convert.ToString()?
Difference Between .ToString() and Convert.ToString() methods in C#?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Milan PrajapatiPosted Nov 19, 2016, 7:12 AM
The Convert.ToString(value) handles NULL values and it does not throw any exception even if value is null. On the other hand,
The value.ToString() does not handle NULL values it will throw NULL reference exception.
Lokesh KumarPosted Nov 19, 2016, 12:15 AM
MessageBox.Show(result .ToString());
MessageBox.Show(Convert.ToString(result ));
MessageBox.Show(result.ToString()); //throw an Error
MayankPosted Nov 18, 2016, 6:05 AM
Convert.ToString()handlesnull, whileToString()doesn't.If u think it resolve your issue please marked as answer.
Salman BegPosted Nov 18, 2016, 6:02 AM