Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
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() method ?
.NET INTERVIEW QUESTIONS - What is the difference between Convert.toString and .toString() method ?
✍: Guest
Consider this 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.
2010-05-04, 5945👍, 0💬
Popular Posts:
Are risk constant through out the project ? * Never say that risk is high through out the project. R...
How many types of validation controls are provided by ASP.NET ? There are six main types of validati...
What Is the "@SuiteClasses" Annotation? "@SuiteClasses" is a class annotation defined in JUnit 4.4 i...
What is PMP(project management plan)? The project management plan is a document that describes the p...
How do you handle change request? Normally change request are handled by preparing an Impact analysi...