Aspose.Words.Examples.CSharp.Programming_Documents.Working_with_Sections.AddDeleteSection.DeleteAllSections C# (CSharp) Метод

DeleteAllSections() приватный статический Метод

Shows how to remove all sections from a document.
private static DeleteAllSections ( string dataDir ) : void
dataDir string
Результат void
        private static void DeleteAllSections(string dataDir)
        {
            // ExStart:DeleteAllSections
            Document doc = new Document(dataDir);
            doc.Sections.Clear();
            // ExEnd:DeleteAllSections
            Console.WriteLine("\nAll sections deleted successfully form the document.");
        }
    }