Task
Task는 비동기 호출에 사용될 수 있습니다. static void Main(string[] args) { Task t = new Task(() => { getMyData(); }); t.Start(); Console.WriteLine("현재 스레드 완료"); Console.Read(); } static void getMyData() { using (FileStream fs = new FileStream("test.txt", FileMode.Open, FileAccess.Read, FileShare.None)) { byte[] b = new byte[fs.Length]; fs.Read(b, 0, b.Length); string s = Encoding.UTF8.GetString(b); Console.Wri..
C#
2018. 6. 29. 14:25