# TXBarcodeCore.GetMaximumTextLength Method

> Returns the maximum text length of the specified barcode type.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 33.0
- **Namespace:** `TXTextControl.Barcode`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXBarcode.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXBarcode.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.Barcode > TXBarcodeCore.GetMaximumTextLength Method
- **493 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-barcode/txbarcodecore/getmaximumtextlength-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-barcode/txbarcodecore/getmaximumtextlength-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-barcode/txbarcodecore/getmaximumtextlength-method/llms-full.txt

---

### Description

Returns the maximum text length of the specified [barcode type](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-barcode/barcodetype/enumeration/llms-full.txt).

### Syntax

```csharp
public static int GetMaximumTextLength(BarcodeType barcodeType);
```

```vbnet
Public Shared Function GetMaximumTextLength(barcodeType As BarcodeType) As Integer
```

### Parameters

| Parameter | Description |
|---|---|
| barcodeType | Specifies the [barcode type](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-barcode/barcodetype/enumeration/llms-full.txt) whose maximum text length is returned. |

### Return Value

The maximum text length for the specified [barcode type](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-barcode/barcodetype/enumeration/llms-full.txt).

### Examples

The following example retrieves maximum text length from the txbarcode core.

```csharp
var result = TXTextControl.Barcode.TXBarcodeCore.GetMaximumTextLength(TXTextControl.Barcode.BarcodeType.QRCode);
Console.WriteLine($"Get Maximum Text Length result: {result}");
```

```vbnet
Dim result = TXTextControl.Barcode.TXBarcodeCore.GetMaximumTextLength(TXTextControl.Barcode.BarcodeType.QRCode)
Console.WriteLine($"Get Maximum Text Length result: {result}")
```

---

## Nearby

- **Previous:** [TXBarcodeCore.GetDefaultText Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-barcode/txbarcodecore/getdefaulttext-method/llms-full.txt)
- **Next:** [TXBarcodeCore.GetMinimumTextLength Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-barcode/txbarcodecore/getminimumtextlength-method/llms-full.txt)
