TaskListCollection.Insert(Int32, 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.
Inserts an element into the TaskListCollection object at the specified index.
public:
void Insert(int index, Microsoft::Web::Management::Client::TaskList ^ taskList);
public void Insert (int index, Microsoft.Web.Management.Client.TaskList taskList);
member this.Insert : int * Microsoft.Web.Management.Client.TaskList -> unit
Parameters
- index
- Int32
The zero-based index at which taskList
should be inserted.
Exceptions
taskList
is null
or not a TaskList object.
Examples
The following example inserts a task list into the task list collection.
public override TaskListCollection Tasks
{
get
{
TaskListCollection tlc = base.Tasks;
if (_dhTaskList == null)
{
_dhTaskList = new HierarchyDemoInfoTaskList(this);
}
tlc.Insert(0, _dhTaskList);
return tlc;
}
}