I have the following method:
The error I'm getting is "Cannot implicitly convert type 'string[*,*]' to 'string'". So that tells me what the issue is. However, I'm not sure how to fix it.
How do I change this method, so that it properly returns my two dimensional array?
Code:
public string[,] StringConvert_tblVFWPost(DataTable dt1)
{
string[,] stringArray = new string[dt1.Rows.Count, dt1.Columns.Count];
for(int row = 0; row < dt1.Rows.Count; ++row)
{
for(int col = 0; col < dt1.Columns.Count; col++)
{
stringArray[row, col] = dt1.Rows[row][col].ToString();
}
return stringArray;
}
}
How do I change this method, so that it properly returns my two dimensional array?
Comment