AquaLogic Interaction Development Kit (IDK) 6.0.0 |

# ITaskList.CreateTask Method

Creates and returns a task object.

ITask CreateTask(
string name,
string description,
DateTime startTime,
DateTime endTime
);

#### Parameters

name
  The name of the task; cannot be `null`.
description
  The description of the task; cannot be `null`.
startTime
  The start time of the task, cannot be `null`.
endTime
  The end time of the task, cannot be `null`.

#### Return Value

An `ITask` object that represents the new task.

#### Remarks

The newly created task object will not be stored until `Store` is called.

Note: The value of the start date and end date stored in the database may vary by a few milliseconds from the supplied date. The date in this object will reflect the stored date after a call to `Store`.

#### Exceptions

Exception Type | Condition
--- | ---
InvalidOperationException | The object has not yet been stored or has already been removed.

#### See Also

ITaskList Interface | Plumtree.Remote.PRC.Collaboration.Tasklist Namespace