Difference between convert.tostring and .tostring() method, DOT NET Programming

What is the difference between Convert.toString and .toString() method

To know the difference between Convert.toString and .toString() see the below code :

int i =0;

MessageBox.Show(i.ToString());

MessageBox.Show(Convert.ToString(i));

We can change the integer "i" using "i.ToString()" or "Convert.ToString" so what is  the difference.

The fundamental difference b/w them is "Convert" function handles NULLS while "i.ToString()" does not.

It will provide a NULL reference exception error. So as good coding practice using "convert" is always secure.

Posted Date: 9/21/2012 7:04:02 AM | Location : United States







Related Discussions:- Difference between convert.tostring and .tostring() method, Assignment Help, Ask Question on Difference between convert.tostring and .tostring() method, Get Answer, Expert's Help, Difference between convert.tostring and .tostring() method Discussions

Write discussion on Difference between convert.tostring and .tostring() method
Your posts are moderated
Related Questions
I need mt4 programmer Project Description: I'm seeking a professional programmer to teach me MQL I have few years experience in manual trading but totally NONE in MT4 / EA

Develop a Hotel Booking Wholesale System Project Description: This project is about to prepare a hotel wholesale system for B2B offering travel agents and affiliate websites

Can a .NET web application consume Java web service? Yes Offcourse.Actually Webservices are independent  to language. It depends on WSDL and SOAP. so any one can develope the W

What is DCOM? DCOM is different from COM in that it allows for creating objects distributed around  a network, and a protocol for invoking that object's methods, & secures the

What is fill factor? The 'fill factor' option describes how full SQL Server will make each index page. When there is no free space to insert a new row on the index page, the SQ

What is Dataset object ? The DataSet gives the basis for the disconnected storage and manipulation of the relational data. We fill it from the  data store, work with it while d

Question: (a) Give three key differences between the DetailsView and FormView controls. (b) The ASP.NET 2.0 Framework introduces the idea of validation groups. How Valida

. write a program for displaying the total no of characters, words and sentences in a given file

I would like to develop a new website to compete with an existing one: greatandhra I would like the new website to be less flashy, more content driven and be inspired from below

ASP Developer- We are needed to hire an ASP developer for some urgent work. He needs to add a new page to an already prepared site; the page is already completed in HTML. He jus