# Slide Sections

Group slides into named sections and add them from the slide master.

```csharp
using NetCorePpt;                  // PptxGen, Slide
using NetCorePpt.CoreInterfaces;   // option objects: TextProps* / ShapeProps / ImageProps / TableProps / HAlign / VAlign ...
using NetCorePpt.CoreEnums;        // ShapeType, ChartType, MediaType, ShadowType, BulletType, DashType, SCHEME_COLORS ...
using TableRow = System.Collections.Generic.List<NetCorePpt.CoreInterfaces.TableCell>;
```

Group slides using sections.

## Syntax

**PptxGenJS · typescript**

```typescript
pptx.addSection({ title: "Tables" });
pptx.addSection({ title: "Tables", order: 3 });
```

**NetCorePpt · C#**

```csharp
pptx.addSection(new SectionProps("Tables"));
pptx.addSection(new SectionProps("Tables", 3));
```

## Section Options

| Option | Type | Description | Possible Values |
| --- | --- | --- | --- |
| `title` | string | section title | 0-n OR 'n%'. (Ex: `{x:'50%'}` will place object in the middle of the Slide) |
| `order` | integer | section order | 1-n. Used to add section at any index |

## Section Example

**PptxGenJS · typescript**

```typescript
import pptxgen from "pptxgenjs";
let pptx = new pptxgen();

// STEP 1: Create a section
pptx.addSection({ title: "Tables" });

// STEP 2: Provide section title to a slide that you want in corresponding section
let slide = pptx.addSlide({ sectionTitle: "Tables" });

slide.addText("This slide is in the Tables section!", { x: 1.5, y: 1.5, fontSize: 18, color: "363636" });
pptx.writeFile({ fileName: "Section Sample.pptx" });
```

**NetCorePpt · C#**

```csharp
using NetCorePpt;
using NetCorePpt.CoreInterfaces;

var pptx = new PptxGen();

// STEP 1: Create a section
pptx.addSection(new SectionProps("Tables"));

// STEP 2: Provide section title to a slide that you want in corresponding section
var slide = pptx.addSlide(new AddSlideProps { sectionTitle = "Tables" });

slide.addText("This slide is in the Tables section!",
    new TextPropsOptions { x = 1.5, y = 1.5, fontSize = 18, color = "363636" });

await pptx.exportToFile("Section Sample.pptx");
```
