title: type casting in c#.net
body: <p>i want to know typecasting in c# .net, i have below lines of code.</p>
  
  <pre><code>int i=4
  object o = i // This works properly without any typecasting becausing boxing takes place automatically
  string s= i // This does not work, even when the string is also reference type?
  string s=(string)i //This also does not work even if i try to typecast the int to string.
  string s= Convert.ToString(i); // this works.
  </code></pre>
  
  <p>so i want to know why <code>string s = i and string s = (string)i</code> does not work and whats the difference in using <code>(string)i, i.ToString(), and Convert.ToString(i)</code>.</p>