title: Convert object array to string array including null values
body: <p>I want to convert object array into string array without excluding null values..
  I got the following code to convert object array to string array.But it excludes null values..</p>
  
  <pre><code>string[] foo = myvalues.OfType&lt;object&gt;().Select(o =&gt; o.ToString()).ToArray();  
  </code></pre>
  
  <p>I searched a lot in Google,but failed to find a solution</p>
  
  <p>Pls help. </p>
  
  <p>EDIT:-
  Got the answer...</p>
  
  <pre><code>List&lt;string&gt; lst = new List&lt;string&gt;(); 
  foreach (object o in myvalues) 
  if (o==null)
   { 
  lst.Add(null); 
  } 
  else 
  { 
  lst.Add(o.ToString()); 
  } 
  string[] str2 = lst.ToArray();
  </code></pre>