User FAQs

If you have a question, please send it to us.

1) What is Multi-Threading ?
This allows different tasks to be carried out in parallel.
The advantage of a divide and conquer strategy is that it will improve performance.

2) What is the difference between a Background Thread and a Foreground Thread ?
A foreground thread runs indefinitely.
A background thread terminates when the foreground thread is stopped.

3) What does the 'async' keyword do ?
Introduced in C# 5.0 (.NET 4.5).

4) What is displayed when this code runs ?

public main() 

public async void Method1()

The Method1 is executed on a different thread and this message box will only be displayed after the 10 seconds.

5) What does the [ThreadStatic] attribute do ?


This is used to indicate a variable is thread safe.
A static variable is not shared between threads.
Each executing thread will have a separate instance of the field and will independently set and get values for that variables.
If the variable is accessed on a different thread, it will contain a different value.

© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext