# CommentedText.Select Method

> Selects the commented part of the document.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **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 > CommentedText.Select Method
- **558 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/select-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/select-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/select-method/llms-full.txt

---

### Description

Selects the commented part of the document.

### Syntax

```csharp
public bool Select();
```

```vbnet
Public Function [Select]() As Boolean
```

### Return Value

The return value is true, if the text has been selected. Otherwise it is flase.

### Examples

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

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

if (commentedText.Select())
{
    Console.WriteLine("Select completed successfully.");
}
```

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

If commentedText.Select() Then
    Console.WriteLine("Select completed successfully.")
End If
```

---

## Nearby

- **Previous:** [CommentedText.ScrollTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/scrollto-method/llms-full.txt)
- **Next:** [CommentedText.Start Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/commentedtext/start-property/llms-full.txt)
