title: Pass a lambda expression in place of IComparer or IEqualityComparer or any single-method interface?
body: <p>I happened to have seen some code where this guy passed a lambda expression to a ArrayList.Sort(IComparer here) or a IEnumerable.SequenceEqual(IEnumerable list, IEqualityComparer here) where an IComparer or an IEqualityComparer was expected.</p>
  
  <p>I can't be sure if I saw it though, or I am just dreaming. And I can't seem to find an extension on any of these collections that accepts a Func&lt;> or a delegate in their method signatures.</p>
  
  <p>Is there such an overload/extension method? Or, if not, is it possible to muck around like this and pass an algorithm (read delegate) where a single-method interface is expected?</p>
  
  <p><strong>Update</strong>
  Thanks, everyone. That's what I thought. I must've been dreaming. I know how to write a conversion. I just wasn't sure if I'd seen something like that or just thought I'd seen it.</p>
  
  <p><strong>Yet another update</strong>
  Look, here, I found one such instance. I wasn't dreaming after all. Look at <a href="http://www.revindex.com/?TabId=65&amp;EntryID=23" rel="noreferrer">what this guy is doing here</a>. What gives?</p>
  
  <p><strong>And here's another update:</strong>
  Ok, I get it. The guy's using the <code>Comparison&lt;T&gt;</code> overload. Nice. Nice, but totally prone to mislead you. Nice, though. Thanks.</p>