mobile ads

Friday 11 October 2013

Difference between Convert.ToString() and .ToString()

We can convert the integer i using i.ToString () or Convert.ToString
The basic difference between them is the Convert function handles NULLS while i.ToString () does not; it will throw a NULL reference exception error. So as good coding practice using convert is always safe.


You can create a class and override the toString method to do anything you want.

The Convert.toString converts the specified value to its equivalent string representation.

0 comments:

Post a Comment