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 the purpose of the integer parse method the decimal parse method?
What is namespace c#?
Where do we set the min and max pool size for connection pooling?
What does it mean?
What is serialization in c#?
What is string pool in c#?
Why do we need constructor?
What is tryparse?
Which is better javascript or c#?
Can abstract class be sealed?
What are properties in c#. Explain with an example?
What is join in c#?
Is c and c# the same?
Is vs as c#?
Why do we need generics?