title: Distinct in linq?
body: <p>I am wondering how can I achieve this?</p>
  
  <p>I want to get only distinct names from a collection of objects</p>
  
  <pre><code>MyObject a = new Object();
  a.Name = 'One';
  a.Value = '10';
  
  
  MyObject b = new Object();
  b.Name = 'One';
  b.Value = '15';
  
  
  MyObject c = new Object();
  c.Name = 'Two';
  c.Value = '10';
  </code></pre>
  
  <p>So I want to get only back the name. I don't care about the value in this case just the name.</p>
  
  <p>So I tried</p>
  
  <p>//add all the objects to a collection.</p>
  
  <pre><code>myCollection.Disinct()..Select(x =&gt; new MyClassToStore() {Text = x.Name, Value = x.Name}).ToList());
  </code></pre>
  
  <p>However I need to do distinct at the property level not at the object level. So I want back "One" and "Two". Right now I get "One", "One" and "Two" back.</p>
  
  <p>I see a library called <a href="http://code.google.com/p/morelinq/" rel="noreferrer">morelinq </a> but I not sure if I should use it as it still in beta and does not seem to be developed on anymore.</p>
  
  <p>Plus a whole library for one extract query I am not sure if it is worth it.</p>