SectionClearContent Method
Clears the section.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.10
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.
[C#]

Document doc = new Document(MyDir + "Document.doc");
Section section = doc.Sections[0];
section.ClearContent();
See Also