我有两个文件流,它们从不同的文件收集不同的信息:
FileStream dataStruc = new FileStream("c:\\temp\\dataStruc.txt", FileMode.Create, FileAccess.ReadWrite);
FileStream csvFile = new FileStream("c:\\temp\\" + fileName + ".txt", FileMode.Create, FileAccess.ReadWrite);
StreamWriter sw = new StreamWriter(csvFile);
StreamWriter swc = new StreamWriter(dataStruc);
当两个流写入器都用于获取相同的信息时,如下所示:
sw.WriteLine(sheet);
swc.WriteLine(sheet);
然后sw
streamwriter 从文件中获取信息。我是否错误地设置了我的文件流?