# FormulaException.CharacterIndex Property

> Gets the one-based character index of the first invalid character in the formula string.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 26.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 > FormulaException.CharacterIndex Property
- **314 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formulaexception/characterindex-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formulaexception/characterindex-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formulaexception/characterindex-property/llms-full.txt

---

### Description

Gets the one-based character index of the first invalid character in the formula string.

### Syntax

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

```vbnet
Public ReadOnly Property CharacterIndex As Integer
```

### Examples

The following example includes the character index value in application diagnostics. The created object is then available to the surrounding document workflow.

```csharp
Console.WriteLine($"Character Index: {formulaException.CharacterIndex}");
Console.WriteLine("Formula Exception is ready for use.");
```

```vbnet
Console.WriteLine($"Character Index: {formulaException.CharacterIndex}")
Console.WriteLine("Formula Exception is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [FormulaException Class](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formulaexception/llms-full.txt)
- **Next:** [Frame Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/frame/enumeration/llms-full.txt)
