# ServerTextControl.Comments Property

> Gets a collection of all comments. 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.Server.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.Server.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Server.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > ServerTextControl.Comments Property
- **332 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/comments-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/comments-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/comments-property/llms-full.txt

---

### Description

Gets a collection of all comments. 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
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:** [ServerTextControl.CommentDeleted Event](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/commentdeleted-event/llms-full.txt)
- **Next:** [ServerTextControl Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/constructor/llms-full.txt)
