title: Create a list of objects and display them in the console through another class
body: <p>For a homework assignment i need to create a <code>List&lt;T&gt;</code>, add objects to it, and display the objects toString. Here is what i have:</p>
  
  <pre><code>public class Order
  {
      ...
        public List&lt;OrderLine&gt; orderLines;
        public Order(User user1)
        {
            ...
            orderLines = new List&lt;OrderLine&gt;();
        }
  
        public void AddOrderLine(OrderLine newOrderLine)
        {
            orderLines.Add(newOrderLine);
        }
  }
  
  public class OrderLine
  {
     public OrderLine(Product p1, int q1)
     {
        ...
     }
     public override string ToString() //Required by teacher
     {
        string myOrderLine;
        myOrderLine = String.Format("[Product name: {0}; Price: {1}; Quantity: {2}]", 
           product.name, product.price, quantity);
        return myOrderLine;
     }
  }
  </code></pre>
  
  <p>When adding oerderLines.Add(newOrderLine) new OrderLine is an object created in another class that has a working toString. How do i display all the newOrderLines from the Program.CS?</p>