title: How to convert Object to List<MyClass>?
body: <p>I am trying to make a generic method that can accept any object, in which, even the object is <code>List&lt;AnyClass&gt;</code>.
  Something like:</p>
  
  <pre><code>public static void MyMethod(object _anyObject)
  {
  
  }
  </code></pre>
  
  <p>So in my method it accept the parameter as Object, then I will determine what to do by their type to do</p>
  
  <p>So when I know that's a List type, I want to convert that Object back to <code>List&lt;AnyClass&gt;</code>, iternate each object and their propertie</p>
  
  <p>I tried to do:</p>
  
  <pre><code>List&lt;object&gt; ObjectList = object as List&lt;object&gt;;
  </code></pre>
  
  <p>But it will return <code>null</code>, because the object originally is <code>List&lt;AnyClass&gt;</code></p>
  
  <p>Thanks in advance</p>
  
  <p>================</p>
  
  <p>Edit: Sorry, seems like I haven't make it clear, because I simplifed the problem... 
  I means the Object might be:</p>
  
  <pre><code>_anyObject = List&lt;Class1&gt;
  _anyObject = Class2
  _anyObject = DataSet
  _anyObject = AnyClass
  _anyObject = List&lt;object&gt;
  </code></pre>
  
  <p>So say, the user can even put in a <code>List&lt;object&gt;</code>, but each of the object in that list can be different class..That's why I can't use <code>&lt;T&gt;</code>.</p>
  
  <p>The original of my problem is:</p>
  
  <pre><code>public static void MyMethod(List&lt;object&gt; _anyList)
  {
  
  }
  </code></pre>
  
  <p>Then I don't care what they put into the list, even the object in the list contains another object list...</p>