What is the difference between public int i and public int i {get; set;} (what is the difference between automatic property and a public member?)
<blockquote>
  <p><strong>Possible Duplicates:</strong><br>
  <a href="http://stackoverflow.com/questions/1876197/c-why-have-empty-get-set-properties-instead-of-using-a-public-member-variable">c#: why have empty get set properties instead of using a public member variable?</a><br>
  <a href="http://stackoverflow.com/questions/1180860/c-public-fields-versus-automatic-properties">C#: Public Fields versus Automatic Properties</a>  </p>
</blockquote>



<p>I am using "automatic" properties in my code, 
and I wonder what is the actual difference between
this code:</p>

<pre><code>public class foo{
    public int i;
}
</code></pre>

<p>and </p>

<pre><code>public class foo{
    public int i {get; set;}
}
</code></pre>

<p>I know there is a difference, as sine 3rd parties that I've used missed the public members but found them once adding the <code>{get; set;}</code>.</p>

<p>AS there is no private field behind that, what is going behind the scene ?</p>
