Misa

Q42_126_20240331131122.jpg

  • Media owner Misa
  • Ngày thêm
(Choose 1 answer)
class Program{
static void PrintNumber(string message){
for (int i = 1; i <= 2; i++) {
Console.WriteLine($"{message}: {i}");Thread.Sleep(1000);
}
} static void Main(){
Thread.CurrentThread.Name = "Main":
Task task01 = new Task(() => PrintNumber("Task 01")):
task01.Start():
Console.WriteLine($"Thread '{Thread.CurrentThread.Name}'");
Console.ReadKey():
}
}
Which one of the following is the output of the above code?
A. Results are unpredictable
B. Task 01:2
Thread 'Main'
Task 01:1
C. Task 01:1
Thread 'Main'
Task 01:2
D. Thread 'Main'
Task 01:1
Task 01:2


Q: 42

Thông tin

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

Image metadata

Filename
Q42_126_20240331131122.webp
File size
211.8 KB
Dimensions
1920px x 892px

Share this media

Back
Bên trên