title: DisplayMember in Combobox not working properly
body: <p>I have this method that adds <code>Conta</code> instances to a <code>ComboBox</code> called "comboContas":</p>
  
  <pre><code>public void AdicionaConta(Conta novaConta)
  {
      comboContas.Items.Add(novaConta);
      comboContas.DisplayMember = "Titular";
  }
  </code></pre>
  
  <p>Note that I've set the <code>DisplayMember</code> property to "Titular". Here is my <code>Conta</code> class:</p>
  
  <pre><code>public abstract class Conta
  {
      public int Numero { get; set; }
  
      public double Saldo { get; set; }
  
      public Cliente Titular { get; set; }
  
      public override string ToString()
      {
          return "titular: " + this.Titular.Nome;
      }       
  }
  </code></pre>
  
  <p>Now, "Titular" is of <code>Cliente</code> type. 
  Here's <code>Cliente</code> class:</p>
  
  <pre><code>public class Cliente
  {
      public string Nome { get; set; }
      public string Rg { get; set; }
  
      public Cliente(string nome)
      {
          this.Nome = nome;
      }
  
      public override string ToString()
      {
          return "ToString do Cliente: " + this.Nome;
      }
  }
  </code></pre>
  
  <p>What I'd like to show in the "comboContas" ComboBox is something like "ToString do Cliente: Gabriel".
  However, the <code>ToString</code> method of the <code>Cliente</code> class is not being called. Instead, the one being called is from the <code>Conta</code> class.</p>
  
  <p><a href="https://i.stack.imgur.com/p8uc3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p8uc3.png" alt="enter image description here"></a></p>
  
  <p>This is pretty simple stuff and I really don't know what's happening. If I change <code>DisplayMember</code> to any other property, it works. If I change the type of the "Titular" property to any other type, the <code>ToString()</code> of this other type is called. It just doesn't work with <code>Cliente</code>.</p>