title: What is the this[parameter] syntax for?
body: <p>I've just come across this syntax for the first time (I'm using WPF but not sure if it's only for WPF)</p>
  
  <pre><code>public string this[string name]
  {
     if(this.User == name)
     {
        ...
     }
  }
  </code></pre>
  
  <p>What are the advantages of using this over a standard method like below? </p>
  
  <pre><code>public string Validate(string name)
  {
     if(this.User == name)
     {
        ...
     }
  }
  </code></pre>
  
  <p>I tried compiling <code>public string this(string name)</code> and that doesn't work so the <code>this</code> aspect is the key. But does this format achieve something that a standard method doesn't and is it only specific to WPF or is it a language implementation? </p>