I'm creating an export from SQL
to TXT.
With this I add the ";" after building each column.
But at the end of the last column you are adding the ";" also.
How do I get this ";" the end of the last column of all lines?
My% of construction of rows and columns:
foreach (DataRow row in dt.Rows)
{
foreach (DataColumn column in dt.Columns)
{
txt += row[column.ColumnName].ToString() + ";";
int tamanho_linha = txt.Length;
txt = Convert.ToString(tamanho_linha - 1);
}
txt += "\r\n";
}