DiscussionThread.AddComment Method (TeamFoundationIdentity, CommentType, String, Comment)

Adds a new 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 ( _
    author As TeamFoundationIdentity, _
    commentType As CommentType, _
    content As String, _
    parentComment As Comment _
) As Comment
public Comment AddComment(
    TeamFoundationIdentity author,
    CommentType commentType,
    string content,
    Comment parentComment
)
public:
Comment^ AddComment(
    TeamFoundationIdentity^ author, 
    CommentType commentType, 
    String^ content, 
    Comment^ parentComment
)
member AddComment : 
        author:TeamFoundationIdentity * 
        commentType:CommentType * 
        content:string * 
        parentComment:Comment -> Comment
public function AddComment(
    author : TeamFoundationIdentity, 
    commentType : CommentType, 
    content : String, 
    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