---
Product: Aspose.PDF
Platform: net
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/net/LayerCollection
---

# LayerCollection

## Overview

`LayerCollection` is a class in Aspose.PDF FOSS for .NET.
Inherits from: `IReadOnlyList`.

Represents the collection of layers on a specific page.

This class provides 2 methods for working with LayerCollection objects in .NET programs.
Available methods include: `Add`, `GetEnumerator`.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: `Count`.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `Count` | `int` | Read | Number of layers on this page. |

## Methods

| Signature | Description |
|-----------|-------------|
| `Add(layer: OptionalContentGroup)` | Add a new layer to this page. |
| `GetEnumerator()` | Calls GetEnumerator on this LayerCollection instance. |

## See Also

- [Aspose.PDF for .NET — Enterprise API Reference](https://reference.aspose.com/pdf/net/)