Is there a way to find all the thread names that are running in a
project?
For example, if I have 5 threads T1, T2, T3, T4, T5...and T2, T4, and
T5 are running...I want to be able to know that T2, T4 and T5 are
already running.
You can use the System.Diagnostics.Process class's Threads member to access
your process threads - You won't be able to get the name from there
though...
This property will give you the number of unmanaged threads, not the
managed threads. So there might be some differences in the results.
Really... I don't see that in the docs. Are you sure about this? I
guess you learn something new every day
I never checked it, but I assume that this can be the case ("operating
system threads"):
"
An array of type 'ProcessThread' representing the operating system threads
currently running in the associated process.
"
When starting a new thread using PInvoke inside your .NET application,
then this thread would be listed in 'Threads', but it would not be a
managed thread. If you are using 3rd party components, another
component may start an unmanaged thread.