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

# OutlineCollection

## Overview

`OutlineCollection` is a class in Aspose.PDF FOSS for .NET.
Inherits from: `System.Collections.Generic.IEnumerable`.

This class provides 11 methods for working with OutlineCollection objects in .NET programs.
Available methods include: `Add`, `Clear`, `Contains`, `CopyTo`, `Delete`, `GetEnumerator`, `Remove`.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: `Count`, `First`, `IsReadOnly`, `IsSynchronized`, `Items`, `Last`, and 2 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `Items` | `IReadOnlyList` | Read | Top-level outline items. |
| `Count` | `int` | Read | Gets the count. |
| `First` | `OutlineItemCollection?` | Read | The first top-level outline item, or null if the collection is empty. |
| `Last` | `OutlineItemCollection?` | Read | The last top-level outline item, or null if the collection is empty. |
| `IsReadOnly` | `bool` | Read | Always false: the collection is mutable. |
| `IsSynchronized` | `bool` | Read | Always false: callers serialise their own access. |
| `SyncRoot` | `object` | Read | Sentinel object for ICollection.SyncRoot-style locking. |
| `VisibleCount` | `int` | Read | Number of outline items currently visible (Open == true). |

## Methods

| Signature | Description |
|-----------|-------------|
| `GetEnumerator()` | Enumerator over the top-level outline items, typed as OutlineItemCollection. |
| `Delete()` | Removes all outline items from the collection. |
| `Delete(name: string)` | Removes the outline item with the specified name (matched against Title). |
| `Add(item: OutlineItem)` | Adds an outline item to the collection. |
| `Add(outline: OutlineItemCollection)` | Add an item typed as OutlineItemCollection. |
| `Clear()` | Removes every item from the collection (counterpart to Delete()). |
| `Contains(item: OutlineItemCollection)` | Whether item is currently in the collection. |
| `CopyTo(array: OutlineItemCollection[], index: int)` | Copy items into array starting at index. |
| `Remove(item: OutlineItem)` | Remove the supplied item by reference and report whether it was present. |
| `Remove(item: OutlineItemCollection)` | Remove the OutlineItemCollection-typed item by reference; reports whether it was present. |
| `Remove(index: int)` | Remove the item at the given 1-based index, matching the 1-based this[int] indexer. |

## See Also

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