# Line.Save Method

> Saves the line's text with the specified format.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 10.1
- **Namespace:** `TXTextControl`
- **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
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > Line.Save Method
- **1548 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/line/save-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/line/save-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/line/save-method/llms-full.txt

---

### Description

Saves the line's text with the specified format.

### Syntax

#### Save(out byte\[\], BinaryStreamType)

Saves the line's text in a byte array with the specified format.

```csharp
public void Save(out byte[] binaryData, BinaryStreamType binaryStreamType);
```

```vbnet
Public Sub Save(ByRef binaryData As Byte(), binaryStreamType As BinaryStreamType)
```

| Parameter | Description |
|---|---|
| binaryData | Specifies a byte array into which the line's text is saved. No memory needs to be allocated through the caller. |
| binaryStreamType | Specifies one of the [BinaryStreamType](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/binarystreamtype/enumeration/llms-full.txt) values. |

#### Save(out string, StringStreamType)

Saves the line's text as a string with the specified format.

```csharp
public void Save(out string stringData, StringStreamType stringStreamType);
```

```vbnet
Public Sub Save(ByRef stringData As String, stringStreamType As StringStreamType)
```

| Parameter | Description |
|---|---|
| stringData | Specifies a string into which the line's text is saved. No memory needs to be allocated through the caller. |
| stringStreamType | Specifies one of the [StringStreamType](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/stringstreamtype/enumeration/llms-full.txt) values. |

#### Save(out byte\[\], BinaryStreamType, SaveSettings)

Saves the line's text in a byte array with the specified format and special settings.

```csharp
public void Save(out byte[] binaryData, BinaryStreamType binaryStreamType, SaveSettings saveSettings);
```

```vbnet
Public Sub Save(ByRef binaryData As Byte(), binaryStreamType As BinaryStreamType, saveSettings As SaveSettings)
```

| Parameter | Description |
|---|---|
| binaryData | Specifies a byte array into which the line's text is saved. No memory needs to be allocated through the caller. |
| binaryStreamType | Specifies one of the [BinaryStreamType](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/binarystreamtype/enumeration/llms-full.txt) values. |
| saveSettings | Specifies a [SaveSettings](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/savesettings/llms-full.txt) object with additional information and settings for the save operation. |

#### Save(out string, StringStreamType, SaveSettings)

Saves the line's text as a string with the specified format and special settings.

```csharp
public void Save(out string stringData, StringStreamType stringStreamType, SaveSettings saveSettings);
```

```vbnet
Public Sub Save(ByRef stringData As String, stringStreamType As StringStreamType, saveSettings As SaveSettings)
```

| Parameter | Description |
|---|---|
| stringData | Specifies a string into which the line's text is saved. No memory needs to be allocated through the caller. |
| stringStreamType | Specifies one of the [StringStreamType](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/stringstreamtype/enumeration/llms-full.txt) values. |
| saveSettings | Specifies a [SaveSettings](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/savesettings/llms-full.txt) object with additional information and settings for the save operation. |

### Examples

The following example examines the first line in a short document by using `Line.Save`.

```csharp
textControl.Text = "Quarterly results\nRevenue increased by 12%.";
Line line = textControl.Lines[1];

string stringData = @"{\rtf1\ansi Sample document}";
line.Save(out stringData, StringStreamType.RichTextFormat);
```

```vbnet
textControl.Text = "Quarterly results" & vbCrLf & "Revenue increased by 12%."
Dim line As Line = textControl.Lines(1)

Dim stringData As String = "{\rtf1\ansi Sample document}"
line.Save(stringData, StringStreamType.RichTextFormat)
```

---

## Nearby

- **Previous:** [Line.Page Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/line/page-property/llms-full.txt)
- **Next:** [Line.Start Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/line/start-property/llms-full.txt)
