title: Wrapping List.Add() gives - Object reference not set to an instance of an object
body: <p>I want to wrap <code>List</code> class with my custom class. As for now I have something like this ; </p>
  
  <pre><code>public class PriorityListOfNodes
  {
  
      private List&lt;Node&gt;          list_;
      private IComparer&lt;Node&gt;     sorter_;
  
      public List&lt;Node&gt; List_ {
              get {return list_;}
              set {list_ = value;}
      }
  
      public PriorityListOfNodes ()
      {
              sorter_ = new NodeSorter_fValueDescending ();
      }
  
      public Node PopFromEnd ()
      {
              Node temp = new Node (list_ [list_.Count - 1]);
              list_.RemoveAt (list_.Count - 1);
              return temp;
      }
  
      public Node PeekFromEnd ()
      {
              return list_ [list_.Count - 1];
      }
  
      public void Add (ref Node toAdd)
      {
              Debug.Log (toAdd);
              list_.Add (toAdd);
              list_.Sort (sorter_);
      }
  }
  </code></pre>
  
  <p>When I do now </p>
  
  <pre><code>Node temp = new Node(10,20); //custom constructor
  PriorityListOfNodes l = new PriorityListOfNodes();
  l.add(temp); 
  </code></pre>
  
  <p>I get runtime exception : </p>
  
  <blockquote>
    <p>Object reference not set to an instance of an object</p>
  </blockquote>
  
  <p>I have also tried without <code>ref</code> but with the same result. What am I doing wrong here ?</p>