# DialogButtonCollection.AddRange Method

> Adds a collection of DialogButtons to the collection.

- **Product:** TX Spell .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 3.0
- **Namespace:** `TXTextControl.Proofing`
- **Package:** `TXTextControl.TXSpell.WinForms.SDK` (assembly `TXSpell.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXSpell.Windows.Forms.dll` from the setup
- **Path:** TX Spell .NET for Windows Forms > Reference > TXTextControl.Proofing > DialogButtonCollection.AddRange Method
- **447 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/dialogbuttoncollection/addrange-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/dialogbuttoncollection/addrange-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/dialogbuttoncollection/addrange-method/llms-full.txt

---

### Description

Adds a collection of [DialogButtons](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/dialogbutton/llms-full.txt) to the [collection](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/dialogbuttoncollection/llms-full.txt).

### Syntax

```csharp
public void AddRange(IEnumerable<DialogButton> collection);
```

```vbnet
Public Sub AddRange(collection As IEnumerable(Of DialogButton))
```

### Parameters

| Parameter | Description |
|---|---|
| collection | Specifies the collection of [DialogButtons](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/dialogbutton/llms-full.txt). |

### Examples

The following example uses Add Range in a focused Dialog Button Collection workflow. The created object is then available to the surrounding document workflow.

```csharp
dialogButtonCollection.AddRange(Array.Empty<TXTextControl.Proofing.DialogButton>());
Console.WriteLine("Dialog Button Collection is ready for use.");
```

```vbnet
dialogButtonCollection.AddRange(Array.Empty(Of TXTextControl.Proofing.DialogButton)())
Console.WriteLine("Dialog Button Collection is ready for use.")
```

### Remarks

This method throws an exception when called while the SpellCheckDialog is open.

---

## Nearby

- **Previous:** [DialogButtonCollection.Add Method](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/dialogbuttoncollection/add-method/llms-full.txt)
- **Next:** [DialogButtonCollection.Item Method](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/dialogbuttoncollection/item-method/llms-full.txt)
