![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbFxtD3%2FbtqwAIuMPz7%2FbGMk98kVfKukKikIuMh3hK%2Fimg.png)
Setup "System.IO" 네임스페이스를 추가해야 함 1 using System.IO; Usage - 파일 읽기 .txt 와 .dat 파일을 읽어서 사용함 File.ReadAllText : 파일의 모든 내용을 읽음 File.ReadAllLines : 파일의 내용을 한줄씩 읽음 1 2 3 string variable = File.ReadAllText("Path"); string[] variable = File.ReadAllLines("Path"); cs - 파일 작성 .txt와 .dat 확장자로 파일을 작성하여 저장함 덮어쓰기 1 2 3 StreamWrite writer = new StreamWriter("Path"); writer.WriteLine(string); writer.Write(string..