public void GenerateDetailFile() { if (!Directory.Exists(AppVars.IntegrationFilesLocation)) { Directory.CreateDirectory(AppVars.IntegrationFilesLocation); }
Something like:
sw.WriteLine(row["columnname"].ToString());
would be more appropriate.