I am passing an array as an object in a web method.How can I convert object to an array in web method

```
public static string sample(object arr)
{
    string[] res= (string[])arr; //convertion object to string array
    return "";
}

```

I getting error like this

> 
> An exception of type 'System.InvalidCastException' occurred in
>  Flair.dll but was not handled in user code
> 
> 
>