Question: Q.No.4. Write a C# code part where you need to call the following functions in separate threads, make sure that all threads are running at

Q.No.4. Write a C# code part where you need to call the following functions in separate threads, make sure that all threads are running at the same time in main function. [10 marks]

I. public static void FunctionA() {

for(int x= 1;x <= 100;x++)

{

Console.WriteLine(x*x);

Thread.Sleep(100);

}

}

II. public void PrintArray(List arr)

{

foreach (var v in arr)

{

Console.WriteLine(v);

Thread.Sleep(1500);

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!