C#/.NET - thread example

8 points
Created by:

To use threads in C#/.NET some basic knowledge could be useful.

Useful methods

  • Thread.Start
    See for example here.
  • Thread.Sleep
    See for example here.
  • Thread.Yield
    See for example here.
  • Thread.Join
    See for example here.
  • Thread.Interrupt
    See for example here.
  • Thread.Abort !!! - only for programmers who knows how it works
    See here for example how to stop thread.

Useful properties

  • Thread.Name
    See for example here.
  • Thread.IsBackground
    See for example here.
  • Thread.ThreadState
Note: check full list of constructors, methods and properties in official Microsoft documentation here.
Hey 👋
Would you like to know what we do?
  • Dirask is a friendly IT community for learners, professionals and hobbyists to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.