Many times we want to restrict a task item only to be edited by a person whom it is assigned to.
If a person has contribute access then by default there is no way that we can restrict them to update the task list item.
When you are working with create task activity and create a task, you can always create a special permission object and then assign it to the task properties.
createtaskProperties.AssignedTo = "domain\\user";
System.Collections.Specialized.HybridDictionary specialPermissions =
createTask1.SpecialPermissions = specialPermissions;
This is how you set permission on task list item to allow only assigned to person edit that task list item.