Add System.Data;
DataTable dt = new DataTable( );
dt.Columns.Add("File");
for (int i = 0; i < arrayFile.Length; i++)
{
if (arrayFile[i].Equals(null))
{
break;
}
else
{
dt.Rows.Add(arrayFile[i]);
}
}
Here arrayFile is our array of 1-D.
Blog is made with an aim to help developers and learners of c# language. It will be updated daily with new topics and important concerned questions to .net developers. Follow my blog as an encouragement to give more post with valuable information.
DataTable dt = new DataTable( );
dt.Columns.Add("File");
for (int i = 0; i < arrayFile.Length; i++)
{
if (arrayFile[i].Equals(null))
{
break;
}
else
{
dt.Rows.Add(arrayFile[i]);
}
}
No comments:
Post a Comment