/// <summary>
 /// Deletes a task from the folder.
 /// </summary>
 /// <param name="Name">The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.</param>
 /// <param name="exceptionOnNotExists">Set this value to false to avoid having an exception called if the task does not exist.</param>
 public void DeleteTask(string Name, bool exceptionOnNotExists = true)
 {
     try
     {
         if (v2Folder != null)
         {
             v2Folder.DeleteTask(Name, 0);
         }
         else
         {
             if (!Name.EndsWith(".job", StringComparison.CurrentCultureIgnoreCase))
             {
                 Name += ".job";
             }
             v1List.Delete(Name);
         }
     }
     catch (System.IO.FileNotFoundException)
     {
         if (exceptionOnNotExists)
         {
             throw;
         }
     }
 }
 /// <summary>
 /// Deletes a task from the folder.
 /// </summary>
 /// <param name="Name">The name of the task that is specified when the task was registered. The '.' character cannot be used to specify the current task folder and the '..' characters cannot be used to specify the parent task folder in the path.</param>
 public void DeleteTask(string Name)
 {
     if (v2Folder != null)
     {
         v2Folder.DeleteTask(Name, 0);
     }
     else
     {
         if (!Name.EndsWith(".job", StringComparison.CurrentCultureIgnoreCase))
         {
             Name += ".job";
         }
         v1List.Delete(Name);
     }
 }