Adds the specified WorkItemLink to this collection.
Namespace:  Microsoft.TeamFoundation.WorkItemTracking.Client
Assembly:  Microsoft.TeamFoundation.WorkItemTracking.Client (in Microsoft.TeamFoundation.WorkItemTracking.Client.dll)
Syntax
声明
Public Function Add ( _
    link As WorkItemLink _
) As Integer
public int Add(
    WorkItemLink link
)
public:
int Add(
    WorkItemLink^ link
)
member Add : 
        link:WorkItemLink -> int 
public function Add(
    link : WorkItemLink
) : int
Parameters
- link
 Type: Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemLink
 The WorkItemLink to add to this collection.
Return Value
Type: System.Int32
The index in this collection of the newly added WorkItemLink.
Exceptions
| Exception | Condition | 
|---|---|
| ArgumentNullException | The link parameter was null. | 
| InvalidOperationException | The object that is specified in the link parameter already occurs in this collection. | 
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.