stramwriter (1) 썸네일형 리스트형 [c#] StreamWriter 로 텍스트 파일 생성/쓰기 StreamWriter 로 텍스트 파일 생성/쓰기 public static void SaveFile(string filePath, string saveData = null) { if (!File.Exists(filePath)) { using (StreamWriter sw = File.CreateText(filePath)) { sw.Write(saveData); sw.AutoFlush = true; } } else { using (StreamWriter sw = File.AppendText(filePath)) { sw.Write("\r\n" + saveData); sw.AutoFlush = true; } } } 참조 : StreamWriter MSDN 이전 1 다음