Proper Variable Declaration in C#
<p>I noticed some people declare a private variable and then a public variable with the get and set statements:</p>

<pre><code>private string myvariable = string.Empty;
public string MyVariable
{
    get { return myvariable; }
    set { myvariable = value ?? string.Empty; }
}
</code></pre>

<p>and then some people just do the following:</p>

<pre><code>public string MyVariable
{
    get { return value; }
    set { MyVariable = value; }
}
</code></pre>

<p>Being a bear of little intelligence (yes, I have kids... why do you ask?) I can't figure out why you would choose one over the other.  Isn't it just as effective in using a public variable that you can set any time using the set method of the variable?</p>

<p>Can anyone shed some light on this for me?</p>

<p>UPDATE:  I corrected the second example after several people pointed out it wouldn't compile.  Sorry about that, but the question still remains...</p>
