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

ExtractComments() static private method

static private ExtractComments ( Document doc ) : ArrayList
doc Document
return System.Collections.ArrayList
        static ArrayList ExtractComments(Document doc)
        {
            ArrayList collectedComments = new ArrayList();
            // Collect all comments in the document
            NodeCollection comments = doc.GetChildNodes(NodeType.Comment, true);
            // Look through all comments and gather information about them.
            foreach (Comment comment in comments)
            {
                collectedComments.Add(comment.Author + " " + comment.DateTime + " " + comment.ToString(SaveFormat.Text));
            }
            return collectedComments;
        }
        // ExEnd:ExtractComments

Same methods

ProcessComments::ExtractComments ( Document doc, string authorName ) : ArrayList