Sandeep Kumar

Sandeep Kumar

  • 450
  • 4.3k
  • 614.5k

difference between Console.WriteLine(s.ToString()) & .......

Mar 1 2018 2:59 AM
Here s is a string value  s ,which is containng null.So Can anyone tell what is difference between Statement 1 & Statement 2
 
 
string s;
s=" ";
Console.WriteLine(s.ToString());
Console.WriteLine(Convert.ToString(s)); 

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (3)