# CommentedText.Length Property

> Gets the number of commented characters.

- **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.Length Property
- **544 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/length-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/length-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/length-property/llms-full.txt

---

### Description

Gets the number of commented characters.

### Syntax

```csharp
public int Length { get; }
```

```vbnet
Public ReadOnly Property Length As Integer
```

### Examples

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

```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);

textControl.Select(commentedText.Start, commentedText.Length);
Console.WriteLine("Commented Text is ready for use.");
```

```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)

textControl.Select(commentedText.Start, commentedText.Length)
Console.WriteLine("Commented Text is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [CommentedText.ID Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/id-property/llms-full.txt)
- **Next:** [CommentedText.Number Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/number-property/llms-full.txt)
