ResourceAssignment.Delete

ResourceAssignment.Delete method

Deletes resource assignment from project assignments collection.

public void Delete()

Examples

Shows how to delete a resource assignment.

var project = new Project();
var task = project.RootTask.Children.Add("Task");
var resource = project.Resources.Add("Resource");
var resourceAssignment = project.ResourceAssignments.Add(task, resource);

Console.WriteLine("Assignment count (before): {0}", project.ResourceAssignments.Count);

resourceAssignment.Delete();

Console.WriteLine("Assignment count (after): {0}", project.ResourceAssignments.Count);

See Also