title: Convert object to array type
body: <p>I am passing an array as an object in a web method.How can I convert object to an array in web method</p>
  
  <pre><code>public static string sample(object arr)
  {
      string[] res= (string[])arr; //convertion object to string array
      return "";
  }
  </code></pre>
  
  <p>I getting error like this</p>
  
  <blockquote>
    <p>An exception of type 'System.InvalidCastException' occurred in
    Flair.dll but was not handled in user code</p>
  </blockquote>