using System; using System.Threading.Tasks; namespace test_csharp { static class Program { static Task produce(int a, int b) { return Task.Factory.StartNew(() => { return a + b; }); } static void Main(string[] args) { Task f1 = produce(10, 15); Task f2 = produce(15, 20); int r = f1.Result + f2.Result; Console.WriteLine("Result={0}\n", r); } } }