DiscussionThread.AddComment Method (Comment, Comment)

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

Return Value

Type: Microsoft.TeamFoundation.Discussion.Client.Comment
The new comment added.

Remarks

This method does not make a server trip.

.NET Framework Security

See Also

Reference

DiscussionThread Class

AddComment Overload

Microsoft.TeamFoundation.Discussion.Client Namespace