# RecognizedTextLinesUnit

The `RecognizedTextLinesUnit` class represents an intermediate result unit containing recognized text lines. It inherits from the `IntermediateResultUnit` class.

## Definition

*Namespace:* Dynamsoft.DLR.intermediate_results


```csharp
class RecognizedTextLinesUnit : IntermediateResultUnit, IEnumerable<RecognizedTextLineElement>
```

*Inheritance:* [IntermediateResultUnit](https://www.dynamsoft.com/capture-vision/docs/server/programming/dotnet/api-reference/core/intermediate-results/intermediate-result-unit.md) -> RecognizedTextLinesUnit

## Methods

| Method               | Description |
|----------------------|-------------|
| [`GetCount`](#getcount) | Gets the number of recognized text lines in the unit.|
| [`GetRecognizedTextLine`](#getrecognizedtextline) | Gets the `RecognizedTextLineElement` object at the specified index. |
| [`GetRecognizedTextLines`](#getrecognizedtextlines) | Gets all the `RecognizedTextLineElement` objects. |
| [`RemoveAllRecognizedTextLines`](#removeallrecognizedtextlines) | Removes all recognized text lines. |
| [`RemoveRecognizedTextLine`](#removerecognizedtextline) | Removes the recognized text line at the specified index. |
| [`AddRecognizedTextLine`](#addrecognizedtextline) | Adds a recognized text line. |
| [`SetRecognizedTextLine`](#setrecognizedtextline) | Sets the recognized text line at the specified index. |


### GetCount

Gets the number of recognized text lines in the unit.

```csharp
int GetCount()
```

**Return value**

Returns the number of recognized text lines in the unit.

### GetRecognizedTextLine

Gets the `RecognizedTextLineElement` object at the specified index.

```csharp
RecognizedTextLineElement GetRecognizedTextLine(int index)
```

**Parameters**

`[in] index` The index of the desired `RecognizedTextLineElement` object.

**Return value**

Returns the `RecognizedTextLineElement` object at the specified index.

**See Also**

[RecognizedTextLineElement](https://www.dynamsoft.com/label-recognition/docs/server/programming/dotnet/api-reference/recognized-text-line-element.md)

### GetRecognizedTextLines

Gets all the `RecognizedTextLineElement` objects.

```csharp
RecognizedTextLineElement[] GetRecognizedTextLines()
```

**Return value**

Returns all the `RecognizedTextLineElement` objects.

**See Also**

[RecognizedTextLineElement](https://www.dynamsoft.com/label-recognition/docs/server/programming/dotnet/api-reference/recognized-text-line-element.md)

### RemoveAllRecognizedTextLines

Removes all recognized text lines.

```csharp
void RemoveAllRecognizedTextLines()
```

### RemoveRecognizedTextLine

Removes the recognized text line at the specified index.

```csharp
int RemoveRecognizedTextLine(int index)
```

**Parameters**

`[in] index` The index of the recognized text line to remove.

**Return value**

Returns 0 if successful, otherwise returns a negative value.

### AddRecognizedTextLine

Adds a recognized text line.

```csharp
int AddRecognizedTextLine(RecognizedTextLineElement recognizedTextLine, double[] matrixToOriginalImage)
```

**Parameters**

`[in] recognizedTextLine` The recognized text line to add.

`[in] matrixToOriginalImage` The matrix to original image.

**Return value**

Returns 0 if successful, otherwise returns a negative value.

**See Also**

[RecognizedTextLineElement](https://www.dynamsoft.com/label-recognition/docs/server/programming/dotnet/api-reference/recognized-text-line-element.md)

### SetRecognizedTextLine

Sets the recognized text line at the specified index.

```csharp
int SetRecognizedTextLine(int index, RecognizedTextLineElement recognizedTextLine, double[] matrixToOriginalImage)
```

**Parameters**

`[in] index` The index of the recognized text line to set.

`[in] recognizedTextLine` The recognized text line to set.

`[in] matrixToOriginalImage` The matrix to original image.

**Return value**

Returns 0 if successful, otherwise returns a negative value.

**See Also**

[RecognizedTextLineElement](https://www.dynamsoft.com/label-recognition/docs/server/programming/dotnet/api-reference/recognized-text-line-element.md)
