# OdtSection

An XML-backed named ODT section.

Class 

`OfficeIMO.OpenDocument`

**Namespace**

`OfficeIMO.OpenDocument`

**Assembly**

`OfficeIMO.OpenDocument`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[OdtSection.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSection.cs#L30)

**Modifiers**

sealed

An XML-backed named ODT section.

## Inheritance

- object
- OdtSection

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 2

- Method [OdtDocument.AddSection](/api/open-document/officeimo-opendocument-odtdocument/#method-addsection-string)
- Property [OdtDocument.Sections](/api/open-document/officeimo-opendocument-odtdocument/#property-sections)

Filter members 

Show inherited

## Methods

`public OdtParagraph AddHeading(string text, int level = 1)` [#](#method-addheading-string-int32)

[OdtSection.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSection.cs#L39)

Adds a heading to the section.

Parameters

**text string required**

**level int = 1 optional**

Returns

`OdtParagraph`

`public OdtParagraph AddParagraph(string? text = null)` [#](#method-addparagraph-string)

[OdtSection.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSection.cs#L30)

Adds a paragraph to the section.

Parameters

**text string? = null optional**

Returns

`OdtParagraph`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string Name { get; set; }` [#](#property-name)

[OdtSection.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSection.cs#L15)

Section name.

`public IReadOnlyList<OdtParagraph> Paragraphs { get; }` [#](#property-paragraphs)

[OdtSection.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSection.cs#L24)

Paragraphs directly contained by the section.

<!-- PowerForge markdown artifact sha256:51BEAA8ED50C02BCCF03CBF88969AD4F43E3B9F5263301D677A24F09B209F019 -->
