Convert Dataset element to string array in c#
<p>I am trying to convert the dataset item into the string and save into    the array. But it gives me syntax error. Please help me out. This in VS 2005 and C#</p>

<p>Thanks in advance!!</p>

<pre><code>string strdetailID[] = new string[4];
for(int i = 0; i &lt; x ; i++)
{
   strdetailID[i] = dsImages.Tables[0].Rows[i]["Ad_detailsID"].ToString();
}
</code></pre>
