共用方式為


WorkItem.Copy Method (WorkItemType, WorkItemCopyFlags)

Creates a copy of this WorkItem instance that is of the specified WorkItemType.

Namespace:  Microsoft.TeamFoundation.WorkItemTracking.Client
Assembly:  Microsoft.TeamFoundation.WorkItemTracking.Client (in Microsoft.TeamFoundation.WorkItemTracking.Client.dll)

Syntax

'宣告
Public Function Copy ( _
    targetType As WorkItemType, _
    flags As WorkItemCopyFlags _
) As WorkItem
public WorkItem Copy(
    WorkItemType targetType,
    WorkItemCopyFlags flags
)
public:
WorkItem^ Copy(
    WorkItemType^ targetType, 
    WorkItemCopyFlags flags
)
member Copy : 
        targetType:WorkItemType * 
        flags:WorkItemCopyFlags -> WorkItem 
public function Copy(
    targetType : WorkItemType, 
    flags : WorkItemCopyFlags
) : WorkItem

Parameters

Return Value

Type: Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem
A new WorkItem instance of the specified WorkItemType that is a copy of this WorkItem instance.

Exceptions

Exception Condition
ArgumentNullException

Thrown when targetType is null.

Remarks

The last known saved state of this WorkItem instance is copied.

.NET Framework Security

See Also

Reference

WorkItem Class

Copy Overload

Microsoft.TeamFoundation.WorkItemTracking.Client Namespace