title: C# Optimal way to get property from all class members of same type
body: <p>I'm trying to shorten the code to most efficient way to access a specific property in all the members of the class.</p>
  
  <pre><code>    public class Title
      {
          public string reference { get; set; }
          public string root { get; set; }
          public string name { get; set; }
          public string description { get; set; }
          public string shortT { get; set; }
      }
  
      public class Results
      {
          public List&lt;Title&gt; pop { get; set; }
          public List&lt;Title&gt; exact { get; set; }
          public List&lt;Title&gt; sub { get; set; }
          ...
      }
  </code></pre>
  
  <p><code>Results</code> is coming out of a JSON deserialize. It contains members of the same type, <code>pop</code>, <code>exact</code> and <code>sub</code> (the exact number of members could vary). I would like to filter all the objects in <code>Results</code> who's <code>name</code> contains "jackie"</p>
  
  <p>So what would be the optimal/efficient way to iterate through the Lists of the members (pop, exact, sub) and look at the property <code>name</code> and see if it contains "jackie", without having to directly reference pop, exact or sub.
  Reason being that the JSON could return more members tomorrow like <code>pop</code> or <code>exact</code> etc that I don't know in advanced, so I need to find a way to combine them all into a single searchable list (as they are all of the same type).</p>
  
  <p>Consequently is a way to directly reference the property <code>name</code> for all the members in a single statement as in</p>
  
  <blockquote>
    <p>foreach (string n in Results*.name)</p>
  </blockquote>