foreach(DataRow row in dt.Rows)
{
foreach(var cell in row.ItemArray)
{
builder.Append(cell.ToString());
if(cell != row.lastcell)
builder.Append("\t");
}
builder.Append(Environment.NewLine);
}
i need to make sure that cell!=the last cell in the row
how do i do this?
You don’t need to do that. Just use
string.Joininstead: