# DecodedBarcodeElement Class

The `DecodedBarcodeElement` class represents a decoded barcode element. It inherits from the `RegionObjectElement` class and provides additional functionality for retrieving information about the decoded barcode.

## Definition

*Namespace:* Dynamsoft.DBR


*Inheritance:* [RegionObjectElement](https://www.dynamsoft.com/capture-vision/docs/server/programming/dotnet/api-reference/core/intermediate-results/region-object-element.md) -> DecodedBarcodeElement

```csharp
class DecodedBarcodeElement : RegionObjectElement
```

## Methods

| Method | Description |
| --- | --- |
| [`GetFormat`](#getformat) | Gets the format of the barcode. |
| [`GetFormatString`](#getformatstring) | Gets the string representation of the barcode format. |
| [`GetText`](#gettext) | Gets the text of the decoded barcode. |
| [`GetBytes`](#getbytes)| Gets the raw bytes of the decoded barcode.|
| [`GetBytesLength`](#getbyteslength)  | Gets the length of the raw bytes of the decoded barcode.|
| [`GetDetails`](#getdetails) | Gets the details of the decoded barcode.|
| [`IsDPM`](#isdpm)| Determines whether the decoded barcode is a DPM (Direct Part Marking) code.|
| [`IsMirrored`](#ismirrored)| Determines whether the decoded barcode is mirrored.|
| [`GetAngle`](#getangle) | Gets the orientation angle of the barcode. |
| [`GetModuleSize`](#getmodulesize) | Gets the module size of the barcode. |
| [`GetConfidence`](#getconfidence) | Gets the confidence score of the barcode recognition result. |
| [`GetExtendedBarcodeResultsCount`](#getextendedbarcoderesultscount) | Gets the number of extended barcode results for the decoded barcode.|
| [`GetExtendedBarcodeResult`](#getextendedbarcoderesult) | Gets the extended barcode result at the specified index for the decoded barcode.|
| [`GetExtendedBarcodeResults`](#getextendedbarcoderesults) | Gets all the extended barcode results.|
| [`SetFormat`](#setformat) | Sets the format of the barcode. |
| [`SetText`](#settext) | Sets the text of the decoded barcode. |
| [`SetBytes`](#setbytes)| Sets the raw bytes of the decoded barcode.|
| [`SetConfidence`](#setconfidence) | Sets the confidence score of the barcode recognition result. |
| [`SetLocation`](#setlocation) | Sets the location of the current object. |
| [`GetECISegments`](#getecisegments) | Gets all the ECI segments in the barcode. |

### Inherited Methods

Checkout inherited methods from [RegionObjectElement](https://www.dynamsoft.com/capture-vision/docs/server/programming/dotnet/api-reference/core/intermediate-results/region-object-element.md) for more details.

### GetFormat

It is used to get the format of the barcode.

```csharp
EnumBarcodeFormat GetFormat()
```

**Return value**

Returns the format of the barcode.

**See Also**

[EnumBarcodeFormat](https://www.dynamsoft.com/barcode-reader/docs/server/programming/dotnet/api-reference/enum-barcode-format.md)

### GetFormatString

It is used to get the string representation of the barcode format.

```csharp
string GetFormatString()
```

**Return value**

Returns the string representation of the barcode format.

### GetText

Gets the text of the decoded barcode.

```csharp
string GetText()
```

**Return value**

Returns the text of the decoded barcode.

### GetBytes

Gets the raw bytes of the decoded barcode.

```csharp
byte[] GetBytes()
```

**Return value**

Returns the raw bytes of the decoded barcode.

### GetBytesLength

Gets the length of the raw bytes of the decoded barcode.

```csharp
int GetBytesLength()
```

**Return value**

Returns the length of the raw bytes of the decoded barcode.

### GetDetails

Gets the details of the decoded barcode.

```csharp
BarcodeDetails* GetDetails()
```

**Return value**

Returns the details of the decoded barcode.

**See Also**

- [AztecDetails](https://www.dynamsoft.com/barcode-reader/docs/server/programming/dotnet/api-reference/aztec-details.md)
- [BarcodeDetails](https://www.dynamsoft.com/barcode-reader/docs/server/programming/dotnet/api-reference/barcode-details.md)
- [DataMatrixDetails](https://www.dynamsoft.com/barcode-reader/docs/server/programming/dotnet/api-reference/datamatrix-details.md)
- [OneDCodeDetails](https://www.dynamsoft.com/barcode-reader/docs/server/programming/dotnet/api-reference/oned-code-details.md)
- [PDF417Details](https://www.dynamsoft.com/barcode-reader/docs/server/programming/dotnet/api-reference/pdf417-details.md)
- [QRCodeDetails](https://www.dynamsoft.com/barcode-reader/docs/server/programming/dotnet/api-reference/qr-code-details.md)

### IsDPM

Determines whether the decoded barcode is a DPM (Direct Part Marking) code.

```csharp
bool IsDPM()
```

**Return value**

Returns true if the decoded barcode is a DPM code, false otherwise.

### IsMirrored

Determines whether the decoded barcode is mirrored.

```csharp
bool IsMirrored()
```

**Return value**

Returns true if the decoded barcode is mirrored, false otherwise.

### GetAngle

It is used to get the orientation angle of the barcode.

```csharp
int GetAngle()
```

**Return value**

Returns the orientation angle of the barcode.

### GetModuleSize

It is used to get the module size of the barcode.

```csharp
int GetModuleSize()
```

**Return value**

Returns the module size of the barcode.

### GetConfidence

It is used to get the confidence score of the barcode recognition result.

```csharp
int GetConfidence()
```

**Return value**

Returns the confidence score of the barcode recognition result.

### GetExtendedBarcodeResultsCount

Gets the number of extended barcode results for the decoded barcode.

```csharp
int GetExtendedBarcodeResultsCount()
```

**Return value**

Returns the number of extended barcode results for the decoded barcode.

### GetExtendedBarcodeResult

Gets the extended barcode result at the specified index for the decoded barcode.

```csharp
ExtendedBarcodeResult GetExtendedBarcodeResult(int index)
```

**Parameters**

`[in] index` The index of the extended barcode result to retrieve.

**Return value**

Returns the extended barcode result at the specified index for the decoded barcode.

**See Also**

[ExtendedBarcodeResult](https://www.dynamsoft.com/barcode-reader/docs/server/programming/dotnet/api-reference/extended-barcode-result.md)

### GetExtendedBarcodeResults

Gets all the extended barcode results.

```csharp
ExtendedBarcodeResult[] GetExtendedBarcodeResults()
```

**Return value**

Returns all the extended barcode results.

**See Also**

[ExtendedBarcodeResult](https://www.dynamsoft.com/barcode-reader/docs/server/programming/dotnet/api-reference/extended-barcode-result.md)

### SetFormat

Sets the format of the barcode.

```csharp
void SetFormat(EnumBarcodeFormat format)
```

**Parameters**

`[in] format` The format of the barcode.

**See Also**

[EnumBarcodeFormat](https://www.dynamsoft.com/barcode-reader/docs/server/programming/dotnet/api-reference/enum-barcode-format.md)

### SetText

Sets the text of the barcode.

```csharp
void SetText(string text)
```

**Parameters**

`[in] text` The text of the barcode.

### SetBytes

Sets the raw bytes of the barcode.

```csharp
void SetBytes(byte[] bytes)
```

**Parameters**

`[in] bytes` The raw bytes of the barcode.

### SetConfidence

Sets the confidence of the barcode.

```csharp
void SetConfidence(int confidence)
```

**Parameters**

`[in] confidence` The confidence of the barcode.

### SetLocation

Sets the location of the current object.

```csharp
void SetLocation(Quadrilateral location)
```

**Parameters**

`[in] location` The location of the barcode.

**See Also**

[Quadrilateral](https://www.dynamsoft.com/capture-vision/docs/server/programming/dotnet/api-reference/core/basic-classes/quadrilateral.md)

### GetECISegments

Gets all the ECI segments in the barcode.

```csharp
ECISegment[] GetECISegments()
```

**Return Value**

Returns an array of [`ECISegment`](https://www.dynamsoft.com/barcode-reader/docs/server/programming/dotnet/api-reference/eci-segment.md) objects. Returns an empty array if no ECI information is present.

**See Also**

[ECISegment](https://www.dynamsoft.com/barcode-reader/docs/server/programming/dotnet/api-reference/eci-segment.md)

**Remarks**

Introduced in Dynamsoft Barcode Reader SDK version 11.4.1000 and Dynamsoft Capture Vision version 3.4.1000.

