TaskListCollection.Remove(TaskList) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes the first occurrence of a specific object from the task list collection.
public:
void Remove(Microsoft::Web::Management::Client::TaskList ^ taskList);
public void Remove (Microsoft.Web.Management.Client.TaskList taskList);
member this.Remove : Microsoft.Web.Management.Client.TaskList -> unit
Parameters
- taskList
- TaskList
The TaskList object to remove from the TaskListCollection object.
Examples
The following example demonstrates the Add and Remove methods.
public void tTLCaddRm() {
TaskListCollection tlc = new TaskListCollection();
Trace.WriteLine("tlc.Count = " + tlc.Count.ToString());
tlc.Add(_dhTaskList);
Trace.WriteLine("After Add tlc.Count = " + tlc.Count.ToString());
tlc.Remove(_dhTaskList);
Trace.WriteLine("After Remove tlc.Count = " + tlc.Count.ToString());
}
Remarks
If the TaskListCollection object does not contain the specified TaskList object, the TaskListCollection remains unchanged. No exception is thrown.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for