What is difference between Convert.ToString(variable) and
variable.ToString()

Answer Posted / sanjib ghosh

Dim salary As Int16
Dim oldSalary As String = salary.ToString()
Dim newSalary As String = Convert.ToString(salary)
MsgBox(oldSalary & "")
MsgBox(newSalary & "")
''No exception throw

both work same function

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is lazy thread safe c#?

491


How to reduce image resolution in C#?

617


What is system console writeline in c#?

456


What is an enumerator in c#?

508


What is the difference between system.string and system.text.stringbuilder classes?

507






What is dynamic dispatch?

541


What is a generic c#?

469


what is the Difference between the public and private ?

506


Is there regular expression (regex) support available to c# developers?

512


What is dynamic in c#?

461


What is difference between ienumerable and iqueryable in c#?

486


How many bytes is an int?

486


How long can a string be c#?

499


What is dto c#?

471


The int maps to which C# keyword in .NET type?

656