Aspose.Words.Examples.CSharp.Programming_Documents.Comments.ProcessComments.RemoveComments C# (CSharp) Method

RemoveComments() static private method

static private RemoveComments ( Document doc ) : void
doc Document
return void
        static void RemoveComments(Document doc)
        {
            // Collect all comments in the document
            NodeCollection comments = doc.GetChildNodes(NodeType.Comment, true);
            // Remove all comments.
            comments.Clear();
        }
        // ExEnd:RemoveComments

Same methods

ProcessComments::RemoveComments ( Document doc, string authorName ) : void