What is difference between Convert.ToString(variable) and
variable.ToString()
Answer Posted / pavel
object ss =null;
string s1 = ss.ToString(); ---------- exeption
string s2 = Convert.ToString(ss); --- ""
--------------------
int ss =null; --- int can't be converted to null
--------------------
int ss = 1;
string s1 = ss.ToString(); ---------- "1"
string s2 = Convert.ToString(ss); --- "1"
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What is marshalling in c#?
How many bits is int32?
What are indexers in c# .net?
What are synchronous and asynchronous operations?
Which constructor is called first in c#?
What's the difference between an integer and int?
When To use HashTable In C#
What all details the assembly manifest will contain?
What is Assembly. and Describe type of assembly. why most developer happy with private assembly.
What is a trace and asset? Explain some differences?
What is sqlconnection in c#?
What is byte c#?
Is null c# operator?
What are primitive types in c#?
Do we get an error while executing the “finally” block in c#?