# OpcClient.CreateSecurity Method

> Reference: Creates a new instance of the OpcClientSecurity class.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcClient</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.client">Opc.UaFx.Client</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Members</dt>
<dd><a href="./members">OpcClient Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

<span class="api-meta">protected · override · since v2.6</span>

Creates a new instance of the [OpcClientSecurity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientsecurity/) class.

<div class="api-signature" data-lang="csharp">

```csharp
protected override sealed OpcClientSecurity CreateSecurity()
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Protected NotOverridable Overrides Function CreateSecurity() As OpcClientSecurity
```

</div>

**Returns**

[OpcClientSecurity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientsecurity/)

A new instance of the[OpcClientSecurity](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclientsecurity/) class.

**Overrides**

[CreateSecurity()](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcapplicationinstance-2/members#createsecurity)
