title: Get list of distinct values in List<T> in c#
body: <p>So, say I have something like the following:
  <pre><code>public class Element
  {
    public int ID;
    public int Type;
    public Properties prorerty;
    ...
  }
  </pre></code>
      and</p>
  
  <pre><code>public class Properties
  {
    public int Id;
    public string Property;
    ...
  }
  </code></pre>
  
  <p>and I have a list of these:</p>
  
  <pre><code>List Elements = new List();</code></pre>
  
  <p>What would be the cleanest way to get a list of all distinct values in the prorerty column in Element class? I mean, I could iterate through the list and add all values that aren't duplicates to another list of strings, but this seems dirty and inefficient. I have a feeling there's some magical Linq construction that'll do this in one line, but I haven't been able to come up with anything.</p>