WHAT IS THE DIFFERENCE BETWEEN .TOSTRING(), CONVERT.TOSTRING()?

Sumit Kesarwani

Total Post:782

Points:3910
Posted by  Sumit Kesarwani
C#  .NET  String 
C#
 1496  View(s)
Ratings:
Rate this:
  1. Sumit Kesarwani

    Post:782

    Points:3910
    What is the difference between .tostring(), Convert.tostring()?

    The basic difference between them is “Convert” function handles NULLS while

    “.ToString()” does not it will throw a NULL reference exception error. So as a good coding

    practice using “convert” is always safe.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!