ApiExamples.ExSection.SectionsAppendSectionContent C# (CSharp) Метод

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

private SectionsAppendSectionContent ( ) : void
Результат void
        public void SectionsAppendSectionContent()
        {
            //ExStart
            //ExFor:Section.AppendContent
            //ExFor:Section.PrependContent
            //ExId:SectionsAppendSectionContent
            //ExSummary:Shows how to append content of an existing section. The number of sections in the document remains the same.
            Document doc = new Document(MyDir + "Section.AppendContent.doc");
            
            // This is the section that we will append and prepend to.
            Section section = doc.Sections[2];

            // This copies content of the 1st section and inserts it at the beginning of the specified section.
            Section sectionToPrepend = doc.Sections[0];
            section.PrependContent(sectionToPrepend);

            // This copies content of the 2nd section and inserts it at the end of the specified section.
            Section sectionToAppend = doc.Sections[1];
            section.AppendContent(sectionToAppend);
            //ExEnd
        }