# InlineStyle Constructor

> Creates a new instance of the InlineStyle class.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Constructor
- **Introduced:** 10.1
- **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 > InlineStyle Constructor
- **741 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/inlinestyle/constructor/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/inlinestyle/constructor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/inlinestyle/constructor/llms-full.txt

---

### Description

Creates a new instance of the InlineStyle class.

### Syntax

#### InlineStyle(string)

Creates a new instance of the InlineStyle class based on the TextControl root style named \[Normal\].

```csharp
public InlineStyle(string name);
```

```vbnet
Public Sub New(name As String)
```

| Parameter | Description |
|---|---|
| name | Specifies the new style's name. |

#### InlineStyle(string, string)

Creates a new instance of the InlineStyle class based on the specified base style.

```csharp
public InlineStyle(string name, string baseStyle);
```

```vbnet
Public Sub New(name As String, baseStyle As String)
```

| Parameter | Description |
|---|---|
| name | Specifies the new style's name. |
| baseStyle | Specifies the name of the style the new style based on. |

#### InlineStyle(InlineStyle)

Creates a new root style that has all attributes of the specified style.

```csharp
public InlineStyle(InlineStyle style);
```

```vbnet
Public Sub New(style As InlineStyle)
```

| Parameter | Description |
|---|---|
| style | Is a style the attributes of which are used to initialize the new style. |

### Examples

The following example creates and configures a reusable inline style for the document.

```csharp
InlineStyle inlineStyle = new("Emphasis");
textControl.InlineStyles.Add(inlineStyle);
```

```vbnet
Dim inlineStyle As New InlineStyle("Emphasis")
textControl.InlineStyles.Add(inlineStyle)
```

---

## Nearby

- **Previous:** [InlineStyle.Attributes Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/inlinestyle/attributes-enumeration/llms-full.txt)
- **Next:** [InlineStyle.IsInheritedFromParagraph Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/inlinestyle/isinheritedfromparagraph-method/llms-full.txt)
