C# - MyClass.MyProperty[something]
<p>I want to do something but not sure how to describe it. I have this class</p>

<pre><code>public class Company {
  private List&lt;Person&gt; _persons;
  private Person GetPersonByName(string name) {
    // My code to select Person is here, which is fine
  }
}
</code></pre>

<p>But I want to be able to do this</p>

<pre><code>Company c;
Person p = c.Persons["John"];
</code></pre>

<p>which should implicitly call GetPersonByName("John").</p>

<p>Is that possible? What do I need to add to the Company class?</p>

<p>Thanks in advance!</p>
