ApiExamples.ExInlineStory.AddFootnote C# (CSharp) Метод

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

private AddFootnote ( ) : void
Результат void
        public void AddFootnote()
        {
            //ExStart
            //ExFor:Footnote
            //ExFor:InlineStory
            //ExFor:InlineStory.Paragraphs
            //ExFor:InlineStory.FirstParagraph
            //ExFor:FootnoteType
            //ExFor:Footnote.#ctor
            //ExSummary:Shows how to add a footnote to a paragraph in the document.
            Document doc = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);
            builder.Write("Some text is added.");

            Footnote footnote = new Footnote(doc, FootnoteType.Footnote);
            builder.CurrentParagraph.AppendChild(footnote);
            footnote.Paragraphs.Add(new Paragraph(doc));
            footnote.FirstParagraph.Runs.Add(new Run(doc, "Footnote text."));
            //ExEnd

            Assert.AreEqual("Footnote text.", doc.GetChildNodes(NodeType.Footnote, true)[0].ToString(SaveFormat.Text).Trim());
        }