# ParagraphCollection Class

> An instance of the ParagraphCollection class contains all paragraphs in a Text Control document or part of the document represented through objects of the type Paragraph. An instance of this class can be obtained with the TextControl.Paragraphs, HeaderFooter.Paragraphs or TextFrame.Paragraphs property. The ParagraphCollection class implements the IEnumerable and the ICollection interfaces.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 15.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Implements:** `System.Collections.ICollection`, `System.Collections.IEnumerable`
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > ParagraphCollection Class
- **709 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/llms-full.txt

---

### Description

An instance of the ParagraphCollection class contains all paragraphs in a Text Control document or part of the document represented through objects of the type [Paragraph](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraph/llms-full.txt). An instance of this class can be obtained with the [TextControl.Paragraphs](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/paragraphs-property/llms-full.txt), [HeaderFooter.Paragraphs](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/paragraphs-property/llms-full.txt) or [TextFrame.Paragraphs](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textframe/paragraphs-property/llms-full.txt) property. The ParagraphCollection class implements the IEnumerable and the ICollection interfaces.

### Syntax

```csharp
public class ParagraphCollection : ICollection, IEnumerable
```

```vbnet
Public Class ParagraphCollection
    Implements ICollection, IEnumerable
```

### Examples

The following example works with paragraphs in the current document.

```csharp
ParagraphCollection paragraphCollection = textControl.Paragraphs;
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
```

```vbnet
Dim paragraphCollection As ParagraphCollection = textControl.Paragraphs
textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
```

---

## In This Section

- [ParagraphCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/copyto-method/llms-full.txt): Copies the elements of the collection to an array, starting at a particular index.
- [ParagraphCollection.Count Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/count-property/llms-full.txt): Gets the number of elements contained in the collection.
- [ParagraphCollection.GetEnumerator Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/getenumerator-method/llms-full.txt): Returns an enumerator that can be used to iterate through the collection.
- [ParagraphCollection.GetItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/getitem-method/llms-full.txt): Gets a particular paragraph from the collection.
- [ParagraphCollection.Item Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/item-property/llms-full.txt): Gets a paragraph from the collection. In C# this property is the indexer for the ParagraphCollection class.

---

## Nearby

- **Previous:** [Paragraph.Text Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraph/text-property/llms-full.txt)
- **Next:** [ParagraphCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/paragraphcollection/copyto-method/llms-full.txt)
