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
{
foreach (var v in arr)
{
Console.WriteLine(v);
Thread.Sleep(1500);
}
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
