Console.SetOut 메서드를 사용하여 모든 Console.Out.WriteLines을 파일에 쓰면됩니다. 유일한 문제는 Console.Out.WriteLine이 발생할 때마다 필기 대신 응용 프로그램을 닫을 때 텍스트 파일에 모든 것을 씁니다. 어떻게 실현할 수 있을지에 대한 아이디어가 있습니까? 어떻게합니까? Before Application.Ru
어떻게이 파일을 작성하고 수정할 수 있습니까? 메인에서 string fileName = @"C:\...\MioFile.txt";
: File.CreateText(fileName);
은 그 때 나는 텍스트를 추가하여 파일을 편집 할 때. StreamWriter writer = new StreamWriter(fileName);
sw.WriteLine(