# TXBarcodeCore.Load Method

> Loads barcode data into the control.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 33.0
- **Namespace:** `TXTextControl.Barcode`
- **Package:** `TXTextControl.TextControl.WinForms.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 Windows Forms > Reference > TXTextControl.Barcode > TXBarcodeCore.Load Method
- **873 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecore/load-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecore/load-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecore/load-method/llms-full.txt

---

### Description

Loads barcode data into the control.

### Syntax

#### Load(string)

Loads barcode data into the control from a specified file.

```csharp
public void Load(string fileName);
```

```vbnet
Public Sub Load(fileName As String)
```

| Parameter | Description |
|---|---|
| fileName | Specifies a file the data is loaded from. |

#### Load(Stream)

Loads barcode data into the control from a specified object of type `System.IO.Stream`.

```csharp
public void Load(Stream stream);
```

```vbnet
Public Sub Load(stream As Stream)
```

| Parameter | Description |
|---|---|
| stream | Specifies an object of type `System.IO.Stream` the data is loaded from. The data is loaded from the stream's current position. |

#### Load(TextReader)

Loads barcode data into the control from a specified object of type `System.IO.TextReader`.

```csharp
public void Load(TextReader textReader);
```

```vbnet
Public Sub Load(textReader As TextReader)
```

| Parameter | Description |
|---|---|
| textReader | Specifies an object of type `System.IO.TextReader` the data is loaded from. |

#### Load(XmlReader)

Loads barcode data into the control from a specified object of type `System.Xml.XmlReader`.

```csharp
public void Load(XmlReader xmlReader);
```

```vbnet
Public Sub Load(xmlReader As XmlReader)
```

| Parameter | Description |
|---|---|
| xmlReader | Specifies an object of type `System.IO.XmlReader` the data is loaded from. |

### Examples

The following example loads document content in a specified format. The created object is then available to the surrounding document workflow.

```csharp
tXBarcodeCore.Load("document.docx");
Console.WriteLine("TXBarcode Core is ready for use.");
```

```vbnet
tXBarcodeCore.Load("document.docx")
Console.WriteLine("TXBarcode Core is ready for use.")
```

---

## Nearby

- **Previous:** [TXBarcodeCore.IsTextValid Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecore/istextvalid-method/llms-full.txt)
- **Next:** [TXBarcodeCore.Save Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-barcode/txbarcodecore/save-method/llms-full.txt)
