title: What is the meaning of `public string this[string columnName]` When implementing IDataErrorInfo interface?
body: <p>What is the meaning of <code>public string this[string columnName]</code> When implementing IDataErrorInfo interface?</p>
  
  <pre><code>    public string this[string columnName]
      {
          get
          {
              switch (columnName)
              {
                  case "Name":
                      return ValidateName();
                  case "PhoneNumber":
                      return ValidatePhoneNumber();
                  default:
                      return string.Empty;
              }
          }
      }
  </code></pre>
  
  <p>I don't get it why there are square parentheses and what it does.</p>
  
  <hr>
  
  <p><strong>Answer:</strong>
  Thanks to Hans and Scott now I know that is simply the syntax of an indexer. More information <a href="http://www.dotnetperls.com/indexer" rel="noreferrer">here</a>.</p>