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

Creating dynamic web pages, As you have probably realized by now, Web pages...

As you have probably realized by now, Web pages are much more useful when they are dynamic. In Internet terminology, the word dynamic means several things. Primarily, it refers to

Static chart diagrams, Describe all elements in Static Chart diagrams. ...

Describe all elements in Static Chart diagrams. Package: - The Package logically groups element of a UML model. Class: - The Class describes all set of objects with

I want c# routines for website back end, I want C# routines for website bac...

I want C# routines for website back end Project Description: We want some routines written in C# (.NET) to: * Parse some RESTful APIs to transform and push data to RabbitM

Write a program of console statements - c# program, Write a program of cons...

Write a program of console statements - C# Program I am unable to make out the use of console statements in C# language. Can anyone suggest me any example for this.

Does the performance for viewstate vary?, The Performance of the viewstate ...

The Performance of the viewstate varies depending on the type of server control to which it is applied. The Text Box, Label,   RadioButton,CheckBox, and HyperLink are server contro

Program of reversing array - c# program, Program of Reversing Array - C# Pr...

Program of Reversing Array - C# Program Please provide me assignment help regarding my problem.

Program for framework using microsoft visio, This assignment is based on le...

This assignment is based on lectures, tutorials, computer labs and research work. 1. Background During the lectures and tutorials on business process modeling and business

Crystal Report base output, Hello, I want to develop one crystal report. I ...

Hello, I want to develop one crystal report. I have one database which has 5 field.One is string and others are Boolean. String field name is State and Four remaining fields are Th

Explain the concept of bookmarks in wf 4.0, Explain the concept of Bookmark...

Explain the concept of Bookmarks in WF 4.0. In WF 4.0, a bookmark is a mechanism that enables an activity to wait for an input without interrupting a workflow thread. When an a

Professional telerik winform, Professional TELERIK Bind MS ACCESS Req...

Professional TELERIK Bind MS ACCESS Required: 1. Including custom fields to the Schedule. 2. Schedule Calendar Sync with Outlook 3. Selecting display in Schedule res

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