<p>How do you give a C# auto-property an initial value?</p>

<p>I either use the constructor, or revert to the old syntax. </p>

<p><strong> Using the Constructor:</strong></p>

<pre><code>class Person 
{
    public Person()
    {
        Name = "Initial Name";
    }
    public string Name { get; set; }
}
</code></pre>

<p><strong>Using normal property syntax</strong>  (with an initial value)</p>

<pre><code>private string name = "Initial Name";
public string Name 
{
    get 
    {
        return name;
    }
    set
    {
        name = value;
    }
}
</code></pre>

<p>Is there a better way?</p>

Have you tried using the
DefaultValueAttribute
or
ShouldSerialize and Reset methods
in conjunction with the constructor?  I feel like one of these two methods is necessary if you're making a class that might show up on the designer surface or in a property grid.