title: object to string array
body: <p>I am trying to convert an object (is declared here as 'obj': object is array, primitive) to a string array.</p>
  
  <p>object can be anything uint[], int16[], etc.</p>
  
  <p>I have been trying to use </p>
  
  <pre><code>string[] str = Array.ConvertAll&lt;object, string&gt;((object[])obj, Convert.ToString);
  </code></pre>
  
  <p>The problem occurs when I try to cast the unknown type object into object[].
  I have been getting casting error.</p>
  
  <p>One attempt I made, which failed, was using</p>
  
  <pre><code>object[] arr = (object[])obj;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>IEnumerable&lt;object&gt; list = obj as IEnumerable&lt;object&gt;
  object[] arr = (object[])list;
  </code></pre>
  
  <p>I saw postings regarding value type and reference type issue on casting.</p>
  
  <p>Would there be a simple code that can handle casting to object[] regardless of type of object, as long as it is an array ?
  I am trying to avoid manual handling of every possible type casting.</p>
  
  <p>thanks in advance</p>