title: How do I get the first element from an IEnumerable<T> in .net?
body: <p>I often want to grab the first element of an <code>IEnumerable&lt;T&gt;</code> in .net, and I haven't found a nice way to do it.  The best I've come up with is:</p>
  
  <pre><code>foreach(Elem e in enumerable) {
    // do something with e
    break;
  }
  </code></pre>
  
  <p>Yuck!  So, is there a nice way to do this?</p>