ApiExamples.ExLists.DetectBulletedParagraphs C# (CSharp) Метод

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

private DetectBulletedParagraphs ( ) : void
Результат void
        public void DetectBulletedParagraphs()
        {
            Document doc = new Document();

            //ExStart
            //ExFor:Paragraph.ListFormat
            //ExFor:ListFormat.IsListItem
            //ExFor:CompositeNode.GetText
            //ExFor:List.ListId
            //ExSummary:Finds and outputs all paragraphs in a document that are bulleted or numbered.
            NodeCollection paras = doc.GetChildNodes(NodeType.Paragraph, true);
            foreach (Paragraph para in paras)
            {
                if (para.ListFormat.IsListItem)
                {
                    Console.WriteLine(string.Format("*** A paragraph belongs to list {0}", para.ListFormat.List.ListId));
                    Console.WriteLine(para.GetText());
                }
            }
            //ExEnd
        }