Пример #1
0
        public static void Run(string filePath)
        {
            AsyncMethod file = new AsyncMethod(filePath);
            Task        t    = file.ReadFile();

            t.Wait();
        }
Пример #2
0
        public static void Run()
        {
            string f = "file1.txt";

            BeginEndMethod.Run(f);
            AsyncMethod.Run(f);

            Console.WriteLine("\n\n\n");
            Console.WriteLine("读文件完成。");
        }