title: Getter and Setter declaration in .NET
body: <p>I was wondering what were the differences between those declaration of getters and setters and if there is a preferred method (and why). The first one can be generated automaticly by Visual Studio. How about the others ? Thanks</p>
  
  <p>1st</p>
  
  <pre><code>string _myProperty { get; set; }
  </code></pre>
  
  <p>2nd</p>
  
  <pre><code>string _myProperty;
  
  public string myProperty
  {
      get { return _myProperty; }
      set { _myProperty = value; }
  }
  </code></pre>
  
  <p>3rd</p>
  
  <pre><code>string _myProperty;
  
  public string getMyProperty()
  {
    return this._myProperty;
  }
  
  public void setMyProperty(string value)
  {
    this._myProperty = value;
  }
  </code></pre>