# CommentedText.UserName Property

> Gets the name of the user who has commented the document. This parameter can be null or an empty string to indicate, that an unknown user has made the comment.

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

---

### Description

Gets the name of the user who has commented the document. This parameter can be null or an empty string to indicate, that an unknown user has made the comment.

### Syntax

```csharp
public string UserName { get; }
```

```vbnet
Public ReadOnly Property UserName As String
```

### Examples

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

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

Console.WriteLine($"User Name: {commentedText.UserName}");
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)

Console.WriteLine($"User Name: {commentedText.UserName}")
Console.WriteLine("Commented Text is ready for use.")
```

---

## Nearby

- **Previous:** [CommentedText.Text Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/text-property/llms-full.txt)
- **Next:** [CommentEventArgs Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commenteventargs/llms-full.txt)
