string stringConversion = value.ToString();
string stringConversion = Convert.ToString(value);
We can convert the integer “value ” using “value .ToString()” or “Convert.ToString”
The basic difference between them is “Convert” function handles NULLS .It handles null exception while “value .ToString()”does not it will throw a NULL reference exception error. So as good coding practice using “convert” is always safe.
Happy to code...
0 comments:
Post a Comment