# MergeBlockInfo.Apply Method

> Stores the meta data (filters, sorting instructions and the block merging condition) in the SubTextPart which represents the block. Manipulating any of the aforementioned collections does not update the block automatically, so this method must be called to actually store changes. If a MergeBlockInfo instance is not based on an existing SubTextPart, this method throws an exception.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 29.0
- **Namespace:** `TXTextControl.DocumentServer.DataSources`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXDocumentServer.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.DocumentServer.DataSources > MergeBlockInfo.Apply Method
- **344 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-datasources/mergeblockinfo/apply-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-datasources/mergeblockinfo/apply-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-datasources/mergeblockinfo/apply-method/llms-full.txt

---

### Description

Stores the meta data (filters, sorting instructions and the block merging condition) in the SubTextPart which represents the block. Manipulating any of the aforementioned collections does not update the block automatically, so this method must be called to actually store changes. If a MergeBlockInfo instance is not based on an existing SubTextPart, this method throws an exception.

### Syntax

```csharp
public void Apply();
```

```vbnet
Public Sub Apply()
```

### Examples

The following example applies the merge block info to the current content. The created object is then available to the surrounding document workflow.

```csharp
mergeBlockInfo.Apply();
Console.WriteLine("Merge Block Info is ready for use.");
```

```vbnet
mergeBlockInfo.Apply()
Console.WriteLine("Merge Block Info is ready for use.")
```

### Remarks

This method does not update the children of a block recursively, so you have to call it for each altered child individually. If this method is called on a MergeBlockInfo instance that was not created from an existing SubTextPart, an exception is thrown.

---

## Nearby

- **Previous:** [MergeBlockInfo Class](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-datasources/mergeblockinfo/llms-full.txt)
- **Next:** [MergeBlockInfo.BlockMergingCondition Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-documentserver-datasources/mergeblockinfo/blockmergingcondition-property/llms-full.txt)
