title: How to sort same list using lambda expression?
body: <p>I'm trying to sort the existing list which is <code>ICollection&lt;T&gt;</code> but failed. Below is what I've tried. No error but no effect as well.</p>
  
  <pre><code>....
  ObjectList.OrderBy(x=&gt;x.Name);
  ....
  </code></pre>
  
  <p>Am I totally off from sorting the list using the above way? I also tried:</p>
  
  <pre><code>ObjectList = ObjectList.OrderBy(x=&gt;x.Name);
  </code></pre>
  
  <p>but this is worse as it's giving me error saying I'm missing a cast.</p>
  
  <p><strong>Is it possible to sort the same list instead of assigning it to another variable?</strong></p>