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
Why do we need constructor?
Why c# is type safe?
What is uint c#?
Is the following code legal?
What are expressions c#?
What is the purpose of namespace in c#?
What floating point types is supported in C#?
Why do we need reflection in c#?
Can you store different types in an array in c#?
What is the purpose of a console table?
What is the difference between system.text.stringbuilder and system.string?
Explain the process of abstraction with an example?
Is array passed by reference in c#?
What are synchronous and asynchronous operations?
What is array formula?