title: How to make Binary Search Tree with Object as node?
body: <p>Is there a way you can have a Binary Search Tree with Object nodes, that store multiple values, and which have the ability to treat one of these values as the "main" variable that will be used for comparison when sorting (balancing) the tree.</p>
  
  <p>Example:</p>
  
  <p>Tree = <code>Artist</code> Collection</p>
  
  <ul>
  <li>each <code>Artist</code> is a Node with properties such as <code>Name</code>, <code>Age</code> etc, and</li>
  <li><code>Name</code> is the "main" property that is used for comparison when sorting/balancing the tree</li>
  </ul>
  
  <p>This is what I've tried for my node definition, but I need help with the afore-mentioned features:</p>
  
  <pre><code>    class Artist&lt;T&gt; where T : IComparable
  {
      private T name;
      private T members;
  
      public Artist&lt;T&gt; Left, Right;
  
      public Artist(T Name, T Members)
      {
          name = Name;
          members = Members;
          Left = null;
          Right = null;
      }
      public T Name
      {
          set { name = value; }
          get { return name; }
      }
      public T Members
      {
          set { members = value; }
          get { return members; }
      }
  
  
  } 
  </code></pre>