# ListFormat.TextBeforeNumber Property

> Gets or sets the text that is displayed in front of the number in a numbered list. If this property is an empty string, no additional text is diplayed in front of the number. This property replaces the CharBeforeNumber property of this class.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 15.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.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 Server > Reference > TXTextControl > ListFormat.TextBeforeNumber Property
- **604 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/textbeforenumber-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/textbeforenumber-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/textbeforenumber-property/llms-full.txt

---

### Description

Gets or sets the text that is displayed in front of the number in a numbered list. If this property is an empty string, no additional text is diplayed in front of the number. This property replaces the [CharBeforeNumber](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/charbeforenumber-property/llms-full.txt) property of this class.

### Syntax

```csharp
public string TextBeforeNumber { get; set; }
```

```vbnet
Public Property TextBeforeNumber As String
```

### Examples

The following example applies `TextBeforeNumber` while converting three selected paragraphs into a usable numbered list.

```csharp
textControl.Text = "Research\nDraft\nReview";
textControl.Select(0, textControl.Text.Length);

ListFormat listFormat = new()
{
    Type = ListType.Numbered,
    TextBeforeNumber = "("
};
textControl.Selection.ListFormat = listFormat;
```

```vbnet
textControl.Text = "Research" & vbCrLf & "Draft" & vbCrLf & "Review"
textControl.Select(0, textControl.Text.Length)

Dim listFormat As New ListFormat() With {
    .Type = ListType.Numbered,
    .TextBeforeNumber = "("
}
textControl.Selection.ListFormat = listFormat
```

### Remarks

The property returns an empty string when the text selection contains multiple paragraphs with mixed settings or when the text selection does not contain a numbered list. The [Selection.IsCommonValueSelected](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/selection/iscommonvalueselected-method/llms-full.txt) method can be used to check for mixed attributes.

---

## Nearby

- **Previous:** [ListFormat.TextAfterNumber Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/textafternumber-property/llms-full.txt)
- **Next:** [ListFormat.Type Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/listformat/type-property/llms-full.txt)
