title: Why can't I pass List<Customer> as a parameter to a method that accepts List<object>?
body: <p>The following code gives me this error:</p>
  
  <blockquote>
    <p>Cannot convert from
    'System.Collections.Generic.List'
    to
    'System.Collections.Generic.List'.</p>
  </blockquote>
  
  <p><strong>How can I indicate to the compiler that Customer indeed inherits from object?</strong> Or does it just not do inheritance with generic collection objects (sending a <code>List&lt;string&gt;</code> gets the same error).</p>
  
  <pre><code>using System.Collections.Generic;
  using System.Windows;
  using System.Windows.Documents;
  
  namespace TestControl3423
  {
      public partial class Window2 : Window
      {
          public Window2()
          {
              InitializeComponent();
  
              List&lt;Customer&gt; customers = Customer.GetCustomers();
              FillSmartGrid(customers);
  
              //List&lt;CorporateCustomer&gt; corporateCustomers = CorporateCustomer.GetCorporateCustomers();
              //FillSmartGrid(corporateCustomers);
          }
  
  
          public void FillSmartGrid(List&lt;object&gt; items)
          {
              //do reflection on items and display dynamically
          }
      }
  
      public class Customer
      {
          public string FirstName { get; set; }
          public string LastName { get; set; }
          public string Street { get; set; }
          public string Location { get; set; }
          public string ZipCode { get; set; }
  
          public static List&lt;Customer&gt; GetCustomers()
          {
              List&lt;Customer&gt; customers = new List&lt;Customer&gt;();
              customers.Add(new Customer { FirstName = "Jim", LastName = "Jones", ZipCode = "23434" });
              customers.Add(new Customer { FirstName = "Joe", LastName = "Adams", ZipCode = "12312" });
              customers.Add(new Customer { FirstName = "Jake", LastName = "Johnson", ZipCode = "23111" });
              customers.Add(new Customer { FirstName = "Angie", LastName = "Reckar", ZipCode = "54343" });
              customers.Add(new Customer { FirstName = "Jean", LastName = "Anderson", ZipCode = "16623" });
              return customers;
          }
      }
  }
  </code></pre>