Adds a given comment to this discussion.
An exception will be thrown if: 1. The parentComment is null but: a. The discussion has a root comment.
b. The discussion is already deleted.
2. The parentComment has not yet been published to the server.
Namespace:  Microsoft.TeamFoundation.Discussion.Client
Assembly:  Microsoft.TeamFoundation.Discussion.Client (in Microsoft.TeamFoundation.Discussion.Client.dll)
Syntax
'Declaration
Public Function AddComment ( _
    comment As Comment, _
    parentComment As Comment _
) As Comment
public Comment AddComment(
    Comment comment,
    Comment parentComment
)
public:
Comment^ AddComment(
    Comment^ comment, 
    Comment^ parentComment
)
member AddComment : 
        comment:Comment * 
        parentComment:Comment -> Comment
public function AddComment(
    comment : Comment, 
    parentComment : Comment
) : Comment
Parameters
- comment 
 Type: Microsoft.TeamFoundation.Discussion.Client.Comment- The comment to be added. 
- parentComment 
 Type: Microsoft.TeamFoundation.Discussion.Client.Comment- Parent of the given comment. If null, the new comment will be the root. 
Return Value
Type: Microsoft.TeamFoundation.Discussion.Client.Comment
The new comment added.
Remarks
This method does not make a server trip.
.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.