(Choose 1 answer)
A. 17
B. 15
C. 14
D. 16
}
}
class Program{
public static async Task<int> Method1(){
int sum = 0;
await Task.Run(() => {
for (int i = 1; i <= 5; i++){
sum += i;
}
});return sum;
public static void Method2(int sum) { Console.WriteLine($"{++sum}");}
public static async Task callMethod(){var s = await Method1();Method2(s);
}
static async Task Main(string[] args) { await callMethod();
Console.ReadKey();
}
Which one of the following is the output of the above code?
Exit 4