Share via


TaskListCollection.Contains(TaskList) Method

Definition

Returns a value that indicates whether the object is in the task list collection.

public:
 bool Contains(Microsoft::Web::Management::Client::TaskList ^ taskList);
public bool Contains (Microsoft.Web.Management.Client.TaskList taskList);
member this.Contains : Microsoft.Web.Management.Client.TaskList -> bool

Parameters

taskList
TaskList

The target TaskList object.

Returns

true if the object is in the collection; otherwise, false.

Examples

The following example displays tlc.Contains(_dhTaskList) True in the trace listener.

public void tTaskCont() {

    // Create a initialized collection
    TaskListCollection tlc = Tasks;

    Trace.WriteLine("tlc.Contains(_dhTaskList) " +
        tlc.Contains(_dhTaskList));

    // Create an empty collection
    tlc = new TaskListCollection();

    Trace.WriteLine("tlc.Contains(_dhTaskList) " +
        tlc.Contains(_dhTaskList));

}

Applies to