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

Assignment Help:

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.


Related Discussions:- Difference between convert.tostring and .tostring() method

Difference between shadowing and overriding, What is the difference between...

What is the difference between Shadowing and Overriding? The main basic difference between shadowing and overriding are as follows:- 1) The Overriding redefines only the imp

Implement dtc in .net, How to implement DTC in .NET DTC is implemented ...

How to implement DTC in .NET DTC is implemented using the COM+. Following are some of the steps to implement COM + in .NET:- 1) The "EnterpriseService" namespace has all

C# api to grab option price from cboe web site, C# API to grab option price...

C# API to grab option price from CBOE web site Project Description: On the web page below, user will download option prices of Stock or Index. For example, if you put "VXX" i

Need help to develop a job portal, Job Portal A one-stop explanation to ...

Job Portal A one-stop explanation to all your needs. Consist of employee as well as employer login accounts. Employee capable to look for jobs. Employer capable to post jobs.

Absolute and sliding expiration, What is Absolute and Sliding expiration? ...

What is Absolute and Sliding expiration? The Absolute Expiration allows you to specify the duration of the cache, beginning from the time the cache is activated. The given exam

Powershell, how to replace a keyword using powershell

how to replace a keyword using powershell

List the session variables names and values, Question: (a) One of the ...

Question: (a) One of the advantages of the Session object is that it prompts to you when a user session begins. In this context, a user fills in a registration form and the Se

Asp .net mvc tutor, ASP .NET MVC Tutor Project Description: Work with...

ASP .NET MVC Tutor Project Description: Work with me and assist with troubleshooting lessons, describe in easy to understand terms how to accomplish certain tasks, provide co

Application on web, I have a application on web i am getting some issue ple...

I have a application on web i am getting some issue please make changes and help me out ..please help me Skills required: .NET, MySQL, PHP, ASP, Visual Basic

I need a sharepoint developer tutor, Project Description: I need a Share...

Project Description: I need a SharePoint Developer tutor to teach me the development of SharePoint from scratch. We will be communicating through TeamViewer and Skype. I have ac

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd