title: Convert / Cast IEnumerable to IEnumerable<T>
body: <p>I have a class (A web control) that has a property of type IEnumerable and would like to work with the parameter using LINQ.</p>
  
  <p>Is there any way to cast / convert / invoke via reflection to IEnumerable&lt;T&gt; not knowing the type at compile time?</p>
  
  <pre><code>Method void (IEnumerable source)
  {
      var enumerator = source.GetEnumerator();
  
      if (enumerator.MoveNext())
      {
          var type = enumerator.Current.GetType();
          Method2&lt;type&gt;(source); // this doesn't work! I know!
      }
  }
  
  void Method2&lt;T&gt;(IEnumerable&lt;T&gt; source) {}
  </code></pre>