title: C# - ScheduledTasks class - how to specify localhost?
body: <p>I have a problem with defining the local machine when trying to pull a list of Scheduled Tasks.</p>
  
  <p>"localhost" doesn't seem to work, how could I define the current / local computer</p>
  
  <pre><code>private void testing_Click(object sender, EventArgs e)
  {
      // Get a ScheduledTasks object for the computer named "DALLAS"
      ScheduledTasks st = new ScheduledTasks(@"localhost");
  
      // Get an array of all the task names
      string[] taskNames = st.GetTaskNames();
  
      // Open each task, write a descriptive string to the console
      foreach (string name in taskNames)
      {
          Task t = st.OpenTask(name);
          MessageBox.Show("  " + t.ToString());
          t.Close();
      }
  
      // Dispose the ScheduledTasks object to release COM resources.
      st.Dispose();  
  }
  </code></pre>