SlowAsync() 공개 메소드

public SlowAsync ( ) : Task
리턴 Task
예제 #1
0
 public static void Main(string[] args)
 {
     var doSomething = new DoSomething();
     Task<int> slowTask = doSomething.SlowAsync();
     int fastResult = doSomething.Fast();
     Console.WriteLine("The result from the slow task is {0}", slowTask.Result);            
     Console.WriteLine("The result from the fast task is {0}", fastResult);
     Console.WriteLine("Done");
 }
예제 #2
0
        public static void Main(string[] args)
        {
            var        doSomething = new DoSomething();
            Task <int> slowTask    = doSomething.SlowAsync();
            int        fastResult  = doSomething.Fast();

            Console.WriteLine("The result from the slow task is {0}", slowTask.Result);
            Console.WriteLine("The result from the fast task is {0}", fastResult);
            Console.WriteLine("Done");
        }