title: How to enumerate threads in .NET using the Name property?
body: <p>Suppose I start two threads like this:</p>
  
  <pre><code>// Start first thread
  Thread loaderThread1 = new Thread(loader.Load);
  loaderThread1.Name = "Rope";
  loaderThread1.Start();
  
  // Start second thread
  Thread loaderThread2 = new Thread(loader.Load);
  loaderThread2.Name = "String";
  loaderThread2.Start();
  </code></pre>
  
  <p>Is there any way I can enumerate the threads by using their Name property?</p>
  
  <p>I want to be ablie to check if a thread with a specific name is still running. </p>
  
  <p>Each thread I create works with a named set of data, the name of the data set is used as the name for the thread working with the data. Before starting a worker thread I want to see if any previous thread for the same set of data is already running.</p>
  
  <p>The threads I get when using <code>System.Diagnostics.GetCurrentProcess().Threads</code> are of type <code>ProcessThread</code>, not <code>Thread</code>!</p>