# IFormattedText.Comments Property

> Gets a collection of all comments in the text part. The property's value is an object of the type CommentCollection.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 30.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > IFormattedText.Comments Property
- **449 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/iformattedtext/comments-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/iformattedtext/comments-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/iformattedtext/comments-property/llms-full.txt

---

### Description

Gets a collection of all comments in the text part. The property's value is an object of the type [CommentCollection](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentcollection/llms-full.txt).

### Syntax

```csharp
CommentCollection Comments { get; }
```

```vbnet
ReadOnly Property Comments As CommentCollection
```

### Examples

The following example applies bold formatting through the iformatted text's selection by using `IFormattedText.Comments`.

```csharp
Selection formattedSelection = iFormattedText.Selection;
formattedSelection.Bold = true;
iFormattedText.Selection = formattedSelection;

foreach (CommentedText commentedText in iFormattedText.Comments)
{
    Console.WriteLine(commentedText.Active);
}
```

```vbnet
Dim formattedSelection As Selection = iFormattedText.Selection
formattedSelection.Bold = True
iFormattedText.Selection = formattedSelection

For Each commentedText As CommentedText In iFormattedText.Comments
    Console.WriteLine(commentedText.Active)
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [IFormattedText.Barcodes Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/iformattedtext/barcodes-property/llms-full.txt)
- **Next:** [IFormattedText.DocumentLinks Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/iformattedtext/documentlinks-property/llms-full.txt)
