# CommentCollection.Item Property

> Gets the comment with the specified number from the collection. The number must be between 1 and Count. In C# this property is the indexer for the CommentCollection class.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 30.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
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > CommentCollection.Item Property
- **606 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentcollection/item-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentcollection/item-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentcollection/item-property/llms-full.txt

---

### Description

Gets the comment with the specified number from the collection. The number must be between 1 and Count. In C# this property is the indexer for the CommentCollection class.

### Syntax

```csharp
public CommentedText this[int number] { get; }
```

```vbnet
Default Public ReadOnly Property Item(number As Integer) As CommentedText
```

### Examples

The following example works with comments in the current document by using `CommentCollection.Item`.

```csharp
CommentCollection commentCollection = textControl.Comments;
textControl.Text = "Payment is due within 30 days.";
textControl.Select(0, textControl.Text.Length);
commentCollection.Add(new CommentedText("Verify the payment term."));

Console.WriteLine($"Item: {commentCollection[10]}");
Console.WriteLine("Comment Collection is ready for use.");
```

```vbnet
Dim commentCollection As CommentCollection = textControl.Comments
textControl.Text = "Payment is due within 30 days."
textControl.Select(0, textControl.Text.Length)
commentCollection.Add(New CommentedText("Verify the payment term."))

Console.WriteLine($"Item: {commentCollection.Item(10)}")
Console.WriteLine("Comment Collection is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [CommentCollection.IsSynchronized Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentcollection/issynchronized-property/llms-full.txt)
- **Next:** [CommentCollection.Remove Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentcollection/remove-method/llms-full.txt)
