# IOpcTypeProvider Members

> Reference: Provides type information used in the OPC UA address space.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">IOpcTypeProvider</a></dd>
<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>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

## Methods

### GetType

<span class="api-meta">4 overloads</span>

| Overload | Description |
|---|---|
| [GetType(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctypeprovider/members#gettype-system-string) | Retrieves the [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object which is known under the `name` specified. |
| [GetType(OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctypeprovider/members#gettype-opc-uafx-opcname) | Retrieves the [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object which is known under the `name` specified. |
| [GetType(OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctypeprovider/members#gettype-opc-uafx-opcnodeid) | Retrieves the [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object which declares the type which is identified by the `typeId` specified. |
| [GetType(Type)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctypeprovider/members#gettype-system-type) | Retrieves the [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object which declares the type implemented by the `underlyingType` specified. |

#### GetType(string)

Retrieves the [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object which is known under the `name` specified.

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

```csharp
IOpcType GetType(string name)
```

</div>

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

```vbnet
Function [GetType](name As String) As IOpcType
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [string](https://learn.microsoft.com/dotnet/api/system.string) to use to identify the [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object to retrieve. |

**Returns**

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

The [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object its [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/members#name) is equals (regarding its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#value)) to the `name` specified; otherwise a null reference (Nothing in Visual Basic).

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `name` is equals [Empty](https://learn.microsoft.com/dotnet/api/system.string.empty). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name` is a null reference (Nothing in Visual Basic). |

#### GetType(OpcName)

Retrieves the [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object which is known under the `name` specified.

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

```csharp
IOpcType GetType(OpcName name)
```

</div>

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

```vbnet
Function [GetType](name As OpcName) As IOpcType
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) of the [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object to retrieve. |

**Returns**

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

The [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object its [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/members#name) is equals to the `name` specified; otherwise a null reference (Nothing in Visual Basic).

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name` is a null reference (Nothing in Visual Basic). |

#### GetType(OpcNodeId)

Retrieves the [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object which declares the type which is identified by the `typeId` specified.

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

```csharp
IOpcType GetType(OpcNodeId typeId)
```

</div>

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

```vbnet
Function [GetType](typeId As OpcNodeId) As IOpcType
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) which identifies the [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) to retrieve. |

**Returns**

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

The [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object which is known under the `typeId` specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object which is associated with the `typeId` specified.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `typeId` is a null reference (Nothing in Visual Basic). |

#### GetType(Type)

Retrieves the [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object which declares the type implemented by the `underlyingType` specified.

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

```csharp
IOpcType GetType(Type underlyingType)
```

</div>

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

```vbnet
Function [GetType](underlyingType As Type) As IOpcType
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `underlyingType` | [Type](https://learn.microsoft.com/dotnet/api/system.type) | The [Type](https://learn.microsoft.com/dotnet/api/system.type) which implements the [OpcDataTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypeinfo/) to retrieve. |

**Returns**

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

The [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object which declares the `underlyingType` specified or a null reference (Nothing in Visual Basic) if there isn't a [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) object associated with the `underlyingType` specified.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `underlyingType` is a null reference (Nothing in Visual Basic). |

### GetTypes

Retrieves all [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) objects offered by the [IOpcTypeProvider](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctypeprovider/).

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

```csharp
IOpcType[] GetTypes()
```

</div>

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

```vbnet
Function GetTypes() As IOpcType()
```

</div>

**Returns**

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

An array that contains all [IOpcType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctype/) objects that are offered by the [IOpcTypeProvider](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopctypeprovider/).
