# TextControl.Comments Property

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

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

---

### Description

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

### Syntax

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

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

### Examples

The following example iterates through the comments collection and processes each commented text.

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

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

### Limitations

Read only.

---

## Nearby

- **Previous:** [TextControl.CommentHighlightMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/commenthighlightmode-property/llms-full.txt)
- **Next:** [TextControl.CommentStateChanged Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/commentstatechanged-event/llms-full.txt)
