# RibbonGroupCollection.Add Method

> Adds an object of the type RibbonGroup to the end of the collection.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.Windows.Forms.Ribbon`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Windows.Forms.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.Windows.Forms.Ribbon > RibbonGroupCollection.Add Method
- **447 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbongroupcollection/add-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbongroupcollection/add-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbongroupcollection/add-method/llms-full.txt

---

### Description

Adds an object of the type [RibbonGroup](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbongroup/llms-full.txt) to the end of the collection.

### Syntax

```csharp
public int Add(RibbonGroup ribbonGroup);
```

```vbnet
Public Function Add(ribbonGroup As RibbonGroup) As Integer
```

### Parameters

| Parameter | Description |
|---|---|
| ribbonGroup | The [RibbonGroup](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbongroup/llms-full.txt) to be added to the end of the collection. |

### Return Value

The collection's index at which the value has been added.

### Examples

The following example adds an item to the ribbon group collection.

```csharp
var result = ribbonGroupCollection.Add(new TXTextControl.Windows.Forms.Ribbon.RibbonGroup());
Console.WriteLine($"Add result: {result}");
```

```vbnet
Dim result = ribbonGroupCollection.Add(New TXTextControl.Windows.Forms.Ribbon.RibbonGroup())
Console.WriteLine($"Add result: {result}")
```

---

## Nearby

- **Previous:** [RibbonGroupCollection Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbongroupcollection/llms-full.txt)
- **Next:** [RibbonGroupCollection.Insert Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbongroupcollection/insert-method/llms-full.txt)
