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#
Thanks in advance!!
string strdetailID[] = new string[4];
for(int i = 0; i < x ; i++)
{
strdetailID[i] = dsImages.Tables[0].Rows[i]["Ad_detailsID"].ToString();
}
I have used a
List<string>instead of astringarray, as I think it would be easier to dynamically add elements, but if you want to still use astringarray, you should get the general idea.