title: An object reference is required for the non-static field, method, or property
body: <p>This is the first time i am working with Lists and I don't seem to be getting it right. I have a Customer class with a list of customers as a property in the Customer class (can it be done like this?)</p>
  
  <pre><code>public class Customer
  {
      private List&lt;Customer&gt; customers = new List&lt;Customer&gt;();
  
      public List&lt;Customer&gt; Customers
      {
          get { return customers; }
          set { customers = value; }
      }
  </code></pre>
  
  <p>In my program I add to this customer list like this:</p>
  
  <pre><code>Customer C = new Customer();
  Customer.InputCustomer(C);
  C.Customers.Add(C);
  </code></pre>
  
  <p>Now I need to show the customers in this list. I have added a AllCustomers function to the Customer Class like this: </p>
  
  <pre><code>public static void AllCustomers()
      {
          foreach (Customer customer in Customers) //Fail on "Customers"
          {
              Console.WriteLine("Customer ID: " + customer.ID);
              Console.WriteLine("Customer Name: " + customer.FullName);
              Console.WriteLine("Customer Address: " + customer.Address);
              Console.WriteLine();
          }
      }
  </code></pre>
  
  <p>But I am getting this error in the foreach statement: </p>
  
  <blockquote>
    <p>An object reference is required for the non-static field, method, or property 'AddCustomerList.Customer.Customers.get'    </p>
  </blockquote>
  
  <p>Like I said, this is the first time I am using List, maby i don't understand it right? Can anyone please help me? </p>