PRN221_-_SU_2024_-_Block_5_-_FE_2668.webp
pure_pearl

PRN221_-_SU_2024_-_Block_5_-_FE_2668.webp

Kizspy | Question: 33
(Choose 1 answer)
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?
A. 16
B. 15
C. 14
D. 17
FUOVER

Thông tin

Category
PRN221
Thêm bởi
pure_pearl
Ngày thêm
Lượt xem
1,233
Lượt bình luận
3
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom