Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What is the difference between Convert.toString and .toString()
What is the difference between Convert.toString and .toString() method ?
✍: Guest
Just to give an understanding of what the above question means seethe below code.
int i =0;
MessageBox.Show(i.ToString());
MessageBox.Show(Convert.ToString(i));
We can convert the integer “i” using “i.ToString()” or “Convert.ToString” so what’s the difference.
The basic difference between them is “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.
2007-10-22, 5698👍, 0💬
Popular Posts:
What are different properties provided by Objectoriented systems ? Following are characteristic’s of...
What is CAR (Causal Analysis and Resolution)? The basic purpose of CAR is to analyze all defects, pr...
How To Wirte a Simple JUnit Test Class? This is a common test in a job interview. You should be able...
What's the difference between J2SDK 1.5 and J2SDK 5.0? There is no difference, Sun Microsystems just...
How To Remove the Top White Space of Your Web Page? - CSS Tutorials - Introduction To CSS Basics The...