# CommentedText.Save Method

> Saves the commented text with the specified format.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 30.0
- **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 > CommentedText.Save Method
- **1664 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentedtext/save-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentedtext/save-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentedtext/save-method/llms-full.txt

---

### Description

Saves the commented text with the specified format.

### Syntax

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

Saves the commented 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 commented 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 commented 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 commented 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 commented 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 commented 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 commented 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 commented 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 attaches a reviewer comment to selected contract text by using `CommentedText.Save`.

```csharp
textControl.Text = "Payment is due within 30 days.";
textControl.Select(0, textControl.Text.Length);
CommentedText commentedText = new("Verify the payment term.");
textControl.Comments.Add(commentedText);

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

```vbnet
textControl.Text = "Payment is due within 30 days."
textControl.Select(0, textControl.Text.Length)
Dim commentedText As New CommentedText("Verify the payment term.")
textControl.Comments.Add(commentedText)

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

---

## Nearby

- **Previous:** [CommentedText.ReplyToComment Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentedtext/replytocomment-method/llms-full.txt)
- **Next:** [CommentedText.ScrollTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/commentedtext/scrollto-method/llms-full.txt)
