title: Can I add a List<> of unknown type to a class?
body: <p>I have a class defined as:</p>
  
  <pre><code>public class ReportObjectInformation
  {
      public string tableName { get; set; }
      public int progressBarValue { get; set; }
      public int rowCount { get; set; }
      public bool canConnect { get; set; }
      public int index { get; set; }
      public string summaryFile { get; set; }
      public string reportFile { get; set; }
      public string errorFile { get; set; }
  }
  </code></pre>
  
  <p>I currently have seven different lists of objects in my code.  Is there a way I can do something like:</p>
  
  <pre><code>public class ReportObjectInformation
  {
      public string tableName { get; set; }
      public int progressBarValue { get; set; }
      public int rowCount { get; set; }
      public bool canConnect { get; set; }
      public int index { get; set; }
      public string summaryFile { get; set; }
      public string reportFile { get; set; }
      public string errorFile { get; set; }
      public List&lt;&gt; listOne { get; set; }  // add this
      public List&lt;&gt; listTwo { get; set; }  // add this
  }
  </code></pre>
  
  <p>And then in my code set the list to be one of my seven predefined types of lists?</p>
  
  <p>One of my other lists is made up of this class:</p>
  
  <pre><code>class parameters
  {
      public string firstName{ get; set; }
      public string lastName{ get; set; }
      public string address{ get; set; }
      public string city{ get; set; }
      public string state { get; set; }
      public string country{ get; set; }
      public string active_flag { get; set; }
  }
  </code></pre>
  
  <p>which I create in my code as:</p>
  
  <pre><code>List&lt;parameters&gt; parm_list = new List&lt;parameters&gt;();
  </code></pre>
  
  <p>The parm_list is populated with data.  Now I want to add that list to this other object I'm creating.  At other times in my code I'll want to set the list to one of the my other types but for now how would I do this?  Is this even possible?</p>
  
  <pre><code>ReportObjectInformation reportObject = new ReportObjectInformation();
  reportObject.tableName = "UserInformation";
  reportObject.listOne = parm_list;
  reportObject.listTwo = someother_list;
  </code></pre>