locked
Am trying to get Scheduled task in my listbox but getting Error in code RRS feed

  • Question

  •  {
                listBox1.Items.Clear();
                string machineName = (@"\\" + System.Environment.MachineName);
    ScheduledTasks st = new ScheduledTasks(machineName);
                // Get an array of all the task names
                string[] taskNames = st.GetTaskNames();
                foreach (var taskName in taskNames)
                {
                    listBox1.Items.Add(taskName);
                }

                st.Dispose();
            }

    Bold code getting error.

               
    • Moved by Mike Feng Sunday, May 12, 2013 10:07 AM
    Tuesday, May 7, 2013 3:11 PM

Answers

All replies