예제 #1
0
 static void Main(string[] args) {
     var program = new Program();
     Run("Sharing with locks",program.Sharing_with_locks);
     Run("Sharing with async",program.Sharing_with_async);
     var asyncMethod = new AsyncMethodExample();
     Run("Async Method Example using Task<T>",asyncMethod.Calling_Task_async_method);
     Run("Async Method Example using Result<T>",asyncMethod.Calling_Result_async_method);
 }
예제 #2
0
        static void Main(string[] args)
        {
            var program = new Program();

            Run("Sharing with locks", program.Sharing_with_locks);
            Run("Sharing with async", program.Sharing_with_async);
            var asyncMethod = new AsyncMethodExample();

            Run("Async Method Example using Task<T>", asyncMethod.Calling_Task_async_method);
            Run("Async Method Example using Result<T>", asyncMethod.Calling_Result_async_method);
        }