Write Rows from DataTable to Text File

前端 未结 6 1575
面向向阳花
面向向阳花 2021-02-14 11:31
public void GenerateDetailFile()
{
  if (!Directory.Exists(AppVars.IntegrationFilesLocation))
  {
    Directory.CreateDirectory(AppVars.IntegrationFilesLocation);
  }

          


        
6条回答
  •  抹茶落季
    2021-02-14 12:25

    Something like:

    sw.WriteLine(row["columnname"].ToString());
    

    would be more appropriate.

提交回复
热议问题