title: How to convert Object into Array in vb.net
body: <p>I have a javascript that returns an array</p>
  
  <pre><code>var docArray = new Array(page, stamprect[0], stamprect[3], stamprect[2], stamprect[1],     srot);
  return docArray;
  </code></pre>
  
  <p>and I'm trying to get VB.Net to read it into array</p>
  
  <pre><code>Dim stampInfo() As Integer
  stampInfo = javaScriptObj.getAllGhostStamps(CInt(pages.Item(i)) - 1)
  </code></pre>
  
  <p>im getting error: </p>
  
  <pre><code>Unable to cast object of type 'System.Object[]' to type 'System.Int32[]'.
  </code></pre>
  
  <p>I dont know how to typecast it to array. any help would be appreciated. Thanks</p>