# TrackedChange.Save Method

> Saves the changed text with the specified format.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 26.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.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 for Windows Forms > Reference > TXTextControl > TrackedChange.Save Method
- **1621 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/trackedchange/save-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/trackedchange/save-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/trackedchange/save-method/llms-full.txt

---

### Description

Saves the changed text with the specified format.

### Syntax

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

Saves the changed 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 changed 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-winforms/reference/txtextcontrol/binarystreamtype/enumeration/llms-full.txt) values. |

#### Save(out string, StringStreamType)

Saves the changed 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 changed 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-winforms/reference/txtextcontrol/stringstreamtype/enumeration/llms-full.txt) values. |

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

Saves the changed 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 changed 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-winforms/reference/txtextcontrol/binarystreamtype/enumeration/llms-full.txt) values. |
| saveSettings | Specifies a [SaveSettings](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/llms-full.txt) object with additional information and settings for the save operation. |

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

Saves the changed 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 changed 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-winforms/reference/txtextcontrol/stringstreamtype/enumeration/llms-full.txt) values. |
| saveSettings | Specifies a [SaveSettings](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/savesettings/llms-full.txt) object with additional information and settings for the save operation. |

### Examples

The following example exports the current revision's changed content to an in-memory buffer.

```csharp
TrackedChange trackedChange = textControl.TrackedChanges.GetItem();
if (trackedChange == null)
{
    return;
}
trackedChange.Save(out byte[] changedContent, BinaryStreamType.InternalUnicodeFormat);
Console.WriteLine($"Exported {changedContent.Length} bytes of changed content.");
```

```vbnet
Dim trackedChange As TrackedChange = textControl.TrackedChanges.GetItem()
If trackedChange Is Nothing Then
    Return
End If
Dim changedContent() As Byte = Nothing
trackedChange.Save(changedContent, BinaryStreamType.InternalUnicodeFormat)
Console.WriteLine($"Exported {changedContent.Length} bytes of changed content.")
```

---

## Nearby

- **Previous:** [TrackedChange.Number Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/trackedchange/number-property/llms-full.txt)
- **Next:** [TrackedChange.ScrollTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/trackedchange/scrollto-method/llms-full.txt)
