# OpcContext.Local Class

> Reference: Represents an OpcContext entered by Enter, which knows only the namespaces specified and is used to encode and decode data without a client or server.

<span class="api-meta">since v2.40</span>

<dl class="api-definition">
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</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">OpcContext.Local Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Represents an [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) entered by [Enter](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/members#enter-system-collections-generic-ienumerable-of-opc-uafx-opcnamespace), which knows only the namespaces specified and is used to encode and decode data without a client or server.

## Syntax

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

```csharp
public sealed class OpcContext.Local : OpcContext
```

</div>

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

```vbnet
Public NotInheritable Class OpcContext.Local
    Inherits OpcContext
```

</div>

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) → **OpcContext.Local**

## Implements

<ul class="api-implements">
<li><a href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></li>
<li><a href="../opc.uafx.iopcnamespaceresolver/">IOpcNamespaceResolver</a></li>
</ul>

## Remarks

The context is bound to the thread which entered it; dispose it on that thread. Data types decoded using the context (see [Decode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdata/members#decode-t1-opc-uafx-opccontext-system-byte-array)) are registered with it.

## Methods

| Name | Description |
|---|---|
| [Dispose](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext.local/members#dispose) | Releases all resources used by the OpcContext.Local. |

Inherits members from [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/members).

## Applies to

| Package | Versions |
|---|---|
| Opc.UaFx.Advanced | v2.40–v2.59 |
