# BarcodeCollection Class

> An instance of the BarcodeCollection class contains all barcodes in a document represented through objects of the type DataVisualization.BarcodeFrame. An instance of this class can be obtained with the TextControl.Barcodes, WPF.TextControl.Barcodes or ServerTextControl.Barcodes property. The BarcodeCollection class implements the IEnumerable and the ICollection interfaces.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 19.0
- **Namespace:** `TXTextControl.DataVisualization`
- **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
- **Inherits:** `TXTextControl.FrameBaseCollection`
- **Implements:** `System.Collections.ICollection`, `System.Collections.IEnumerable`
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.DataVisualization > BarcodeCollection Class
- **1068 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodecollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodecollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodecollection/llms-full.txt

---

### Description

An instance of the BarcodeCollection class contains all barcodes in a document represented through objects of the type [DataVisualization.BarcodeFrame](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/llms-full.txt). An instance of this class can be obtained with the [TextControl.Barcodes](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/barcodes-property/llms-full.txt), [WPF.TextControl.Barcodes](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/barcodes-property/llms-full.txt) or [ServerTextControl.Barcodes](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/barcodes-property/llms-full.txt) property. The BarcodeCollection class implements the IEnumerable and the ICollection interfaces.

### Syntax

```csharp
public class BarcodeCollection : FrameBaseCollection
```

```vbnet
Public Class BarcodeCollection
    Inherits FrameBaseCollection
```

### Examples

The following example includes the count value from a Barcode Collection object in application diagnostics. The created object is then available to the surrounding document workflow.

```csharp
Console.WriteLine($"Count: {barcodeCollection.Count}");
Console.WriteLine("Barcode Collection is ready for use.");
```

```vbnet
Console.WriteLine($"Count: {barcodeCollection.Count}")
Console.WriteLine("Barcode Collection is ready for use.")
```

---

## In This Section

- [BarcodeCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodecollection/add-method/llms-full.txt): Inserts a new barcode in a Text Control document.
- [BarcodeCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodecollection/copyto-method/llms-full.txt): Copies the elements of the collection to an array, starting at a particular index.
- [BarcodeCollection.GetItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodecollection/getitem-method/llms-full.txt): Gets a particular barcode from the collection.
- [BarcodeCollection.Remove Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodecollection/remove-method/llms-full.txt): Removes a barcode from a Text Control document.

---

## Nearby

- **Previous:** [TXTextControl.DataVisualization namespace](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/llms-full.txt)
- **Next:** [BarcodeCollection.Add Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodecollection/add-method/llms-full.txt)
