Aspose.Words.Examples.CSharp.Loading_Saving.Worker.SelectTopicStarts C# (CSharp) Метод

SelectTopicStarts() приватный Метод

Selects heading paragraphs that must become topic starts. We can't modify them in this loop, we have to remember them in an array first.
private SelectTopicStarts ( ) : ArrayList
Результат System.Collections.ArrayList
        private ArrayList SelectTopicStarts()
        {
            NodeCollection paras = mDoc.GetChildNodes(NodeType.Paragraph, true);
            ArrayList topicStartParas = new ArrayList();

            foreach (Paragraph para in paras)
            {
                StyleIdentifier style = para.ParagraphFormat.StyleIdentifier;
                if (style == StyleIdentifier.Heading1)
                    topicStartParas.Add(para);
            }

            return topicStartParas;
        }