user image

Preeti Tripathi

Job Interview Skills
English
2 years ago

Question 96. What Is Difference Between Tostring() Vs Convert.tostring() Vs (string) Cast

user image

Abhishek Mishra

2 years ago

There is a simple but important difference between these three. ToString() raise exception when the object is null So in the case of object.ToString(), if object is null, it raise NullReferenceException. Convert.ToString() return string.Empty in case of null object (string) cast assign the object in case of null

Recent Doubts

Close [x]