title: Cast object to IEnumerable<object>?
body: <p>How can I cast an <code>object</code> to <code>IEnumerable&lt;object&gt;</code>?</p>
  
  <p>I know that the object implements <code>IEnumerable&lt;object&gt;</code> but I don't know what type it is. It could be an array, a <code>List&lt;T&gt;</code>, or whatever.</p>
  
  <hr>
  
  <p>A simple test case I'm trying to get working:</p>
  
  <pre><code>static void Main(string[] args)
  {
      object arr = new[] { 1, 2, 3, 4, 5 };
      foreach (var item in arr as IEnumerable&lt;object&gt;)
          Console.WriteLine(item);
      Console.ReadLine();
  }
  </code></pre>