officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-commentcollection-dot-remove-x28-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-comment-x29.md
Removes the specified comment from the collection.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
void Remove(
Comment comment
)
Sub Remove(
comment As Comment
)
| Name | Type | Description |
|---|---|---|
| comment | Comment |
A Comment object to remove from the collection.
|
Document document = server.Document;
document.LoadDocument("Documents\\Grimm.docx", DocumentFormat.Docx);
if (document.Comments.Count > 0)
{
document.Comments.Remove(document.Comments[0]);
}
Dim document As Document = server.Document
document.LoadDocument("Documents\Grimm.docx", DocumentFormat.Docx)
If document.Comments.Count > 0 Then
document.Comments.Remove(document.Comments(0))
End If
The following code snippets (auto-collected from DevExpress Examples) contain references to the Remove(Comment) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/Comments.cs#L37
{
document.Comments.Remove(document.Comments[0]);
}
word-document-api-examples/CS/CodeExamples/CommentsActions.cs#L76
// Delete the first comment.
document.Comments.Remove(document.Comments[0]);
}
winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Comments.vb#L34
If document.Comments.Count > 0 Then
document.Comments.Remove(document.Comments(0))
End If
word-document-api-examples/VB/CodeExamples/CommentsActions.vb#L66
' Delete the first comment.
document.Comments.Remove(document.Comments(0))
End If
See Also