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
author
Type: Microsoft.TeamFoundation.Framework.Client.TeamFoundationIdentityAuthor of the new comment.
commentType
Type: Microsoft.TeamFoundation.Discussion.Client.CommentTypeType of the new comment.
content
Type: System.StringContent of the new comment.
parentComment
Type: Microsoft.TeamFoundation.Discussion.Client.CommentParent of the new comment. If null, the new comment can 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.