# CommentedText.ID Property

> Gets or sets a user-defined identifier. It must be a one-based value. A value of zero indicates that the comment has no identifier.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 30.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.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 Windows Forms > Reference > TXTextControl > CommentedText.ID Property
- **531 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/id-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/id-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/id-property/llms-full.txt

---

### Description

Gets or sets a user-defined identifier. It must be a one-based value. A value of zero indicates that the comment has no identifier.

### Syntax

```csharp
public int ID { get; set; }
```

```vbnet
Public Property ID As Integer
```

### Examples

The following example attaches a reviewer comment to selected contract text by using `CommentedText.ID`.

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

commentedText.ID = 100;
Console.WriteLine($"ID used by Commented Text: {commentedText.ID}");
```

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

commentedText.ID = 100
Console.WriteLine($"ID used by Commented Text: {commentedText.ID}")
```

---

## Nearby

- **Previous:** [CommentedText.HighlightMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/highlightmode-property/llms-full.txt)
- **Next:** [CommentedText.Length Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/length-property/llms-full.txt)
