Most Important Frequently Asked C# Developer Multi Threading Interview Questions
Interview Quesions on C# Developer Multi Threading
-
Answer :A thread is basically a separate sequence of instruction designed to performing a " specific task" in the program.
-
Question 2. What Is Multithreading In C# ?
Answer :Performing multiple task at same time during the execution of a program,is known as multithreading.
C++ Interview Questions -
Question 3. What Is The Namespace Used For Multithreading In C# ?
Answer :using System.Threading;
-
Question 4. What Are The Advantage Of Multithreading In C# ?
Answer :There are two main advantage to use of multithreading in c#.Optimize the use of computer resources such as memory.Save time
C++ Tutorial -
Question 5. What Are The Classes Used In System.threading Namespace ?
Answer :Thread Thread PoolMonitorMutex
C#. NET Interview Questions -
Question 6. What Is The Use Of Thread Class In C#?
Answer :The Thread class is used to perform tasks such as creating and setting the priority of a thread.
-
Question 7. What Are The Main Properties Of Thread Class?
Answer :PriorityThread StateIsAliveCurrent threadName etc.
C#. NET Tutorial C Interview Questions -
Question 8. What Are The Methods Used In Thread Class?
Answer :
- Join
- Resume
- sleep
- Spin Wait
- Suspended
- Start
- Interrupt
-
Question 9. What Is The Thread Pool Class In C#?
Answer :
The Thread Pool class is used,to perform task such as processing of asynchronous i/o and waiting on behalf of another thread.
MVC Framework Interview Questions -
Question 10. What Are The Method Used In Thread Pool Class ?
Answer :
- Gettype
- Equals
- SetMaxThreads
- QueueUserWorkItem
C Tutorial -
Question 11. What Is Monitor Class In C# ?
Answer :
The Monitor class is used to access an object by granting a lock for the object to a single thread.
LINQ Interview Questions -
Question 12. What Are The Methods Used In Monitor Class?
Answer :
- Enter
- Exit
- TryEnter
- Wait
- GetType
C++ Interview Questions -
Question 13. What Is Mutex Class In C#?
Answer :
A Mutex is used ,to perform interprocess synchronization and a thread to have exclusive access to shared resources.
MVC Framework Tutorial -
Question 14. What Are The Methods Used In Mutex Class ?
Answer :
- Equals
- close
- OpenExisting
- SetAccessControl
- Release Mutex
-
Question 15. What Are The Syntax For Creating And Starting A Thread In C#?
Answer :
First define a delegate:-
Public delegate void start_thread();
Create a new thread:-
Thread thread_name = new Thread(new start_thread(method_name));
Windows Presentation Foundation(WPF) Interview Questions -
Question 16. How Can We Scheduled A Thread In C# ?
Answer :
We can scheduled the thread with the help of priority property of the Thread class.
LINQ Tutorial -
Question 17. What Are The Priority Value Used For Scheduling A Thread In C# ?
Answer :
- Highest
- Normal
- AboveNormal
- BelowNormal
- Lowest
Windows Communication Foundation (WCF) Interview Questions -
Question 18. What Are The Two Types Of Thread In C# ?
Answer :
- Foreground thread
- Background thread
C#. NET Interview Questions -
Question 19. What Is The Difference Between Join And Sleep ?
Answer :
You can wait for another thread to end by calling its Join method. For example:
static void Main()
{
Thread t = new Thread (Go);
t.Start();
t.Join();
Console.WriteLine ("Thread t has ended!");
}
static void Go()
{
for (int i = 0; i < 1000; i++) Console.Write ("y");
}
This prints “y” 1,000 times, followed by “Thread t has ended!” immediately afterward. You can include a timeout when calling Join, either in milliseconds or as a TimeSpan. It then returns true if the thread ended or false if it timed out.
Windows Presentation Foundation(WPF) Tutorial -
Question 20. What Is The Difference Between Threads Vs Processes ?
Answer :
A thread is analogous to the operating system process in which your application runs. Just as processes run in parallel on a computer,threads run in parallel within a single process. Processes are fully isolated from each other; threads have just a limited degree of isolation. In particular, threads share (heap) memory with other threads running in the same application. This, in part, is why threading is useful: one thread can fetch data in the background, for instance, while another thread can display the data as it arrives.
Topic: C# Developer Multi Threading Interview Questions
Interview Quesions on C# Developer Multi Threading
No comments:
Post a Comment