SectionClearContent Method

Clears the section.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public void ClearContent()
Remarks

The text of Body is cleared, only one empty paragraph is left that represents the section break.

The text of all headers and footers is cleared, but HeaderFooter objects themselves are not removed.

Examples
Shows how to delete main content of a section.
Document doc = new Document(MyDir + "Document.docx");
Section section = doc.Sections[0];
section.ClearContent();
See Also