Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • The solution Process.GetCurrentProcess().Threads.Count doesn't work. It returns all the processes running but i need the count of threads running that i have creating in my application. Commented Mar 8, 2010 at 6:12
  • Process.GetCurrentProcess().Threads.Count indeed return number of thread for current process, if you need to count all thread of all processes you need to loop thought processes in your application Commented Mar 8, 2010 at 6:39
  • That will also involve thread pool threads. Though you can get the count before creating thread, but it still won't guarantee that its your custom threads who are terminated when the count decreases. Commented Mar 8, 2010 at 9:45