Get and Set properties' initializing
<p>When I write the code like the methods below my fields get initialized correctly and the application works fine.</p>
<pre><code>private string username;
private string password;

public string Password
{
    get { return password; }
    set { password = value; }
}

public string Username
{
    get { return username; }
    set { username = value; }
}

public Authenticate()
{
    this.username = &quot;njabulo&quot;;
    this.password = &quot;12345&quot;;
}
</code></pre>
<p>Before writing it like this I had written the code in the following fashion and the fields didn't get initialized:</p>
<pre><code>private string username;
private string password;

public string Password
{
    get { return password; }
    set { password = &quot;njabulo&quot;; }
}

public string Username
{
    get { return username; }
    set { username = &quot;12345&quot;; }
}
</code></pre>
<p>I would like to know what exactly is causing the error in the second method. I think the <code>value</code> on the <code>set</code> property stands for anything that may be thrown at the property and I am giving it an actual value.</p>