What is causing a nullreference exception in this code?
<p>I try to add a new "Order" to my Session. I begin create a session in my Global.aspx file under Session_Start:</p>

<pre><code>Session.Add("Cart", new WebShopData.Order());
</code></pre>

<p>At my login page i make a new Session:</p>

<pre><code> Session["userID"] = "User";
        ((Order)Session["Cart"]).UserID = userID;
</code></pre>

<p>Then at my shop page i want to add stuff to the session:</p>

<pre><code> if ((Order)Session["Cart"] != null)
((Order)Session["Cart"]).OrderRow.Add(new OrderRows({ArticleID = 2, Quantity = 1) });
</code></pre>

<p>At this last line i get att nullreference exception. Why could that be?</p>

<hr>

<p>Here are my two classes:</p>

<pre><code>   public class Order
   {
    public List&lt;OrderRows&gt; OrderRow { get; set; }
    public string Address { get; set; }
    public string City { get; set; }
    public string Zip { get; set; }
    public int UserID { get; set; }
   }

  public class OrderRows
  {
    public int ArticleID { get; set; }
    public int Quantity { get; set; }

    public override string ToString()
    {
            return string.Format("Artikel: {0}, Antal: {1}.\n", ArticleID, Quantity);
    }
  }
</code></pre>
