What is the difference between “.ToString()” and “Convert.ToString()”?


As such there is no difference between the two methods; both will be returning the same result.

The only difference is that if a NULL value is passed on to the methods, the “.ToString()” will not be able to handle NULL values and will be returning "Null reference exception". 

While the method “Convert.ToString()” will be returning an empty string.

Comments

Popular posts from this blog

jQuery Basics

What is the difference between a Page Layout and Master Page in SharePoint?

Accessing data from SharePoint 2010 to an ASP.NET application