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.TeamFoundationIdentity- Author of the new comment. 
- commentType 
 Type: Microsoft.TeamFoundation.Discussion.Client.CommentType- Type of the new comment. 
- content 
 Type: System.String- Content of the new comment. 
- parentComment 
 Type: Microsoft.TeamFoundation.Discussion.Client.Comment- Parent 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.