# OpcMethodNode Members

> Reference: Defines a method node.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcMethodNode</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>
</dl>

Inherits members from [OpcInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/members), [OpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnode/members).

## Constructors

### OpcMethodNode

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

| Overload | Description |
|---|---|
| [OpcMethodNode(OpcName, Delegate)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#opcmethodnode-opc-uafx-opcname-system-delegate) | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) call given by `callback`. |
| [OpcMethodNode(OpcName, IOpcMethodCommand)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#opcmethodnode-opc-uafx-opcname-opc-uafx-iopcmethodcommand)<span class="api-meta">since v2.9</span> | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command`. |
| [OpcMethodNode(OpcName, IOpcMethodCommand, params OpcArgument\[\])](#opcmethodnode-opc-uafx-opcname-opc-uafx-iopcmethodcommand-opc-uafx-opcargument-array)<span class="api-meta">since v2.9</span> | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command`. |
| [OpcMethodNode(OpcName, IOpcMethodCommand, OpcArgument\[\], params OpcArgument\[\])](#opcmethodnode-opc-uafx-opcname-opc-uafx-iopcmethodcommand-opc-uafx-opcargument-array-opc-uafx-opcargument-array)<span class="api-meta">since v2.9</span> | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command`. |
| [OpcMethodNode(OpcName, OpcNodeId, Delegate)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#opcmethodnode-opc-uafx-opcname-opc-uafx-opcnodeid-system-delegate) | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the delegate to call given by `callback`. |
| [OpcMethodNode(OpcName, OpcNodeId, IOpcMethodCommand)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#opcmethodnode-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-iopcmethodcommand)<span class="api-meta">since v2.9</span> | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command`. |
| [OpcMethodNode(OpcName, OpcNodeId, IOpcMethodCommand, params OpcArgument\[\])](#opcmethodnode-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-iopcmethodcommand-opc-uafx-opcargument-array)<span class="api-meta">since v2.9</span> | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command`. |
| [OpcMethodNode(OpcName, OpcNodeId, IOpcMethodCommand, OpcArgument\[\], params OpcArgument\[\])](#opcmethodnode-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-iopcmethodcommand-opc-uafx-opcargument-array-opc-uafx-opcargument-array)<span class="api-meta">since v2.9</span> | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command`. |
| [OpcMethodNode(IOpcNode, OpcName, Delegate)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#opcmethodnode-opc-uafx-iopcnode-opc-uafx-opcname-system-delegate) | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) call given by `callback` as a child node of the `parent` node given. |
| [OpcMethodNode(IOpcNode, OpcName, IOpcMethodCommand)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#opcmethodnode-opc-uafx-iopcnode-opc-uafx-opcname-opc-uafx-iopcmethodcommand)<span class="api-meta">since v2.9</span> | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command` as a child node of the `parent` node given. |
| [OpcMethodNode(IOpcNode, OpcName, IOpcMethodCommand, params OpcArgument\[\])](#opcmethodnode-opc-uafx-iopcnode-opc-uafx-opcname-opc-uafx-iopcmethodcommand-opc-uafx-opcargument-array)<span class="api-meta">since v2.9</span> | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command` as a child node of the `parent` node given. |
| [OpcMethodNode(IOpcNode, OpcName, IOpcMethodCommand, OpcArgument\[\], params OpcArgument\[\])](#opcmethodnode-opc-uafx-iopcnode-opc-uafx-opcname-opc-uafx-iopcmethodcommand-opc-uafx-opcargument-array-opc-uafx-opcargument-array)<span class="api-meta">since v2.9</span> | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command` as a child node of the `parent` node given. |
| [OpcMethodNode(IOpcNode, OpcName, OpcNodeId, Delegate)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#opcmethodnode-opc-uafx-iopcnode-opc-uafx-opcname-opc-uafx-opcnodeid-system-delegate) | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the delegate to call defined by `callback` as a child node of the `parent` node given. |
| [OpcMethodNode(IOpcNode, OpcName, OpcNodeId, IOpcMethodCommand)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#opcmethodnode-opc-uafx-iopcnode-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-iopcmethodcommand)<span class="api-meta">since v2.9</span> | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) defined by `command` as a child node of the `parent` node given. |
| [OpcMethodNode(IOpcNode, OpcName, OpcNodeId, IOpcMethodCommand, params OpcArgument\[\])](#opcmethodnode-opc-uafx-iopcnode-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-iopcmethodcommand-opc-uafx-opcargument-array)<span class="api-meta">since v2.9</span> | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) defined by `command` as a child node of the `parent` node given. |
| [OpcMethodNode(IOpcNode, OpcName, OpcNodeId, IOpcMethodCommand, OpcArgument\[\], params OpcArgument\[\])](#opcmethodnode-opc-uafx-iopcnode-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-iopcmethodcommand-opc-uafx-opcargument-array-opc-uafx-opcargument-array)<span class="api-meta">since v2.9</span> | Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) defined by `command` as a child node of the `parent` node given. |

#### OpcMethodNode(OpcName, Delegate)

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) call given by `callback`.

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

```csharp
public OpcMethodNode(OpcName name, Delegate callback)
```

</div>

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

```vbnet
Public Sub New(name As OpcName, callback As [Delegate])
```

</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/) through that the new method node can be accessed. |
| `callback` | [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) | The [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) to call on method invokation of the new method node. |

**Exceptions**

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

#### OpcMethodNode(OpcName, IOpcMethodCommand)

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

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command`.

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

```csharp
public OpcMethodNode(OpcName name, IOpcMethodCommand command)
```

</div>

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

```vbnet
Public Sub New(name As OpcName, command As IOpcMethodCommand)
```

</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/) through that the new method node can be accessed. |
| `command` | [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) | The [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) to call on method invokation of the new method node. |

**Exceptions**

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

#### OpcMethodNode(OpcName, IOpcMethodCommand, params OpcArgument\[\])

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

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command`.

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

```csharp
public OpcMethodNode(
    OpcName name,
    IOpcMethodCommand command,
    params OpcArgument[] inputArguments)
```

</div>

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

```vbnet
Public Sub New(
    name As OpcName,
    command As IOpcMethodCommand,
    ParamArray inputArguments As OpcArgument())
```

</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/) through that the new method node can be accessed. |
| `command` | [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) | The [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) to call on method invokation of the new method node. |
| `inputArguments` | params [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/)[] | An array of [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances representing the arguments consumed by the method node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `command` or `inputArguments` (or one of its items) is a null reference (Nothing in Visual Basic). |

#### OpcMethodNode(OpcName, IOpcMethodCommand, OpcArgument\[\], params OpcArgument\[\])

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

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command`.

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

```csharp
public OpcMethodNode(
    OpcName name,
    IOpcMethodCommand command,
    OpcArgument[] inputArguments,
    params OpcArgument[] outputArguments)
```

</div>

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

```vbnet
Public Sub New(
    name As OpcName,
    command As IOpcMethodCommand,
    inputArguments As OpcArgument(),
    ParamArray outputArguments As OpcArgument())
```

</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/) through that the new method node can be accessed. |
| `command` | [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) | The [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) to call on method invokation of the new method node. |
| `inputArguments` | [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/)[] | An array of [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances representing the arguments consumed by the method node. |
| `outputArguments` | params [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/)[] | An array of [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances representing the arguments produced by the method node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `command`, `inputArguments` (or one of its items) or `outputArguments` (or one of its items) is a null reference (Nothing in Visual Basic). |

#### OpcMethodNode(OpcName, OpcNodeId, Delegate)

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the delegate to call given by `callback`.

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

```csharp
public OpcMethodNode(OpcName name, OpcNodeId id, Delegate callback)
```

</div>

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

```vbnet
Public Sub New(name As OpcName, id As OpcNodeId, callback As [Delegate])
```

</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/) through that the new method node can be accessed. |
| `id` | [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/) through that the new method node can be identified and accessed. |
| `callback` | [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) | The [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) to call on method invokation of the new method node. |

**Exceptions**

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

#### OpcMethodNode(OpcName, OpcNodeId, IOpcMethodCommand)

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

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command`.

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

```csharp
public OpcMethodNode(OpcName name, OpcNodeId id, IOpcMethodCommand command)
```

</div>

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

```vbnet
Public Sub New(name As OpcName, id As OpcNodeId, command As IOpcMethodCommand)
```

</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/) through that the new method node can be accessed. |
| `id` | [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/) through that the new method node can be identified and accessed. |
| `command` | [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) | The [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) to call on method invokation of the new method node. |

**Exceptions**

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

#### OpcMethodNode(OpcName, OpcNodeId, IOpcMethodCommand, params OpcArgument\[\])

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

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command`.

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

```csharp
public OpcMethodNode(
    OpcName name,
    OpcNodeId id,
    IOpcMethodCommand command,
    params OpcArgument[] inputArguments)
```

</div>

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

```vbnet
Public Sub New(
    name As OpcName,
    id As OpcNodeId,
    command As IOpcMethodCommand,
    ParamArray inputArguments As OpcArgument())
```

</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/) through that the new method node can be accessed. |
| `id` | [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/) through that the new method node can be identified and accessed. |
| `command` | [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) | The [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) to call on method invokation of the new method node. |
| `inputArguments` | params [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/)[] | An array of [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances representing the arguments consumed by the method node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `command` or `inputArguments` (or one of its items) is a null reference (Nothing in Visual Basic). |

#### OpcMethodNode(OpcName, OpcNodeId, IOpcMethodCommand, OpcArgument\[\], params OpcArgument\[\])

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

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command`.

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

```csharp
public OpcMethodNode(
    OpcName name,
    OpcNodeId id,
    IOpcMethodCommand command,
    OpcArgument[] inputArguments,
    params OpcArgument[] outputArguments)
```

</div>

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

```vbnet
Public Sub New(
    name As OpcName,
    id As OpcNodeId,
    command As IOpcMethodCommand,
    inputArguments As OpcArgument(),
    ParamArray outputArguments As OpcArgument())
```

</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/) through that the new method node can be accessed. |
| `id` | [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/) through that the new method node can be identified and accessed. |
| `command` | [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) | The [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) to call on method invokation of the new method node. |
| `inputArguments` | [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/)[] | An array of [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances representing the arguments consumed by the method node. |
| `outputArguments` | params [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/)[] | An array of [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances representing the arguments produced by the method node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `command`, `inputArguments` (or one of its items) or `outputArguments` (or one of its items) is a null reference (Nothing in Visual Basic). |

#### OpcMethodNode(IOpcNode, OpcName, Delegate)

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) call given by `callback` as a child node of the `parent` node given.

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

```csharp
public OpcMethodNode(IOpcNode parent, OpcName name, Delegate callback)
```

</div>

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

```vbnet
Public Sub New(parent As IOpcNode, name As OpcName, callback As [Delegate])
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `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/) through that the new method node can be accessed. |
| `callback` | [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) | The [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) to call on method invokation of the new method node. |

**Exceptions**

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

#### OpcMethodNode(IOpcNode, OpcName, IOpcMethodCommand)

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

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command` as a child node of the `parent` node given.

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

```csharp
public OpcMethodNode(IOpcNode parent, OpcName name, IOpcMethodCommand command)
```

</div>

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

```vbnet
Public Sub New(
    parent As IOpcNode,
    name As OpcName,
    command As IOpcMethodCommand)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `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/) through that the new method node can be accessed. |
| `command` | [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) | The [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) to call on method invokation of the new method node. |

**Exceptions**

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

#### OpcMethodNode(IOpcNode, OpcName, IOpcMethodCommand, params OpcArgument\[\])

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

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command` as a child node of the `parent` node given.

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

```csharp
public OpcMethodNode(
    IOpcNode parent,
    OpcName name,
    IOpcMethodCommand command,
    params OpcArgument[] inputArguments)
```

</div>

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

```vbnet
Public Sub New(
    parent As IOpcNode,
    name As OpcName,
    command As IOpcMethodCommand,
    ParamArray inputArguments As OpcArgument())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `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/) through that the new method node can be accessed. |
| `command` | [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) | The [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) to call on method invokation of the new method node. |
| `inputArguments` | params [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/)[] | An array of [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances representing the arguments consumed by the method node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `command` or `inputArguments` (or one of its items) is a null reference (Nothing in Visual Basic). |

#### OpcMethodNode(IOpcNode, OpcName, IOpcMethodCommand, OpcArgument\[\], params OpcArgument\[\])

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

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) given by `command` as a child node of the `parent` node given.

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

```csharp
public OpcMethodNode(
    IOpcNode parent,
    OpcName name,
    IOpcMethodCommand command,
    OpcArgument[] inputArguments,
    params OpcArgument[] outputArguments)
```

</div>

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

```vbnet
Public Sub New(
    parent As IOpcNode,
    name As OpcName,
    command As IOpcMethodCommand,
    inputArguments As OpcArgument(),
    ParamArray outputArguments As OpcArgument())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `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/) through that the new method node can be accessed. |
| `command` | [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) | The [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) to call on method invokation of the new method node. |
| `inputArguments` | [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/)[] | An array of [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances representing the arguments consumed by the method node. |
| `outputArguments` | params [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/)[] | An array of [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances representing the arguments produced by the method node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `command`, `inputArguments` (or one of its items) or `outputArguments` (or one of its items) is a null reference (Nothing in Visual Basic). |

#### OpcMethodNode(IOpcNode, OpcName, OpcNodeId, Delegate)

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the delegate to call defined by `callback` as a child node of the `parent` node given.

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

```csharp
public OpcMethodNode(
    IOpcNode parent,
    OpcName name,
    OpcNodeId id,
    Delegate callback)
```

</div>

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

```vbnet
Public Sub New(
    parent As IOpcNode,
    name As OpcName,
    id As OpcNodeId,
    callback As [Delegate])
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `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/) through that the new method node can be accessed. |
| `id` | [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/) through that the new method node can be identified and accessed. |
| `callback` | [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) | The [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) to call on method invokation of the new method node. |

**Exceptions**

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

#### OpcMethodNode(IOpcNode, OpcName, OpcNodeId, IOpcMethodCommand)

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

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) defined by `command` as a child node of the `parent` node given.

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

```csharp
public OpcMethodNode(
    IOpcNode parent,
    OpcName name,
    OpcNodeId id,
    IOpcMethodCommand command)
```

</div>

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

```vbnet
Public Sub New(
    parent As IOpcNode,
    name As OpcName,
    id As OpcNodeId,
    command As IOpcMethodCommand)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `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/) through that the new method node can be accessed. |
| `id` | [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/) through that the new method node can be identified and accessed. |
| `command` | [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) | The [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) to call on method invokation of the new method node. |

**Exceptions**

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

#### OpcMethodNode(IOpcNode, OpcName, OpcNodeId, IOpcMethodCommand, params OpcArgument\[\])

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

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) defined by `command` as a child node of the `parent` node given.

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

```csharp
public OpcMethodNode(
    IOpcNode parent,
    OpcName name,
    OpcNodeId id,
    IOpcMethodCommand command,
    params OpcArgument[] inputArguments)
```

</div>

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

```vbnet
Public Sub New(
    parent As IOpcNode,
    name As OpcName,
    id As OpcNodeId,
    command As IOpcMethodCommand,
    ParamArray inputArguments As OpcArgument())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `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/) through that the new method node can be accessed. |
| `id` | [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/) through that the new method node can be identified and accessed. |
| `command` | [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) | The [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) to call on method invokation of the new method node. |
| `inputArguments` | params [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/)[] | An array of [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances representing the arguments consumed by the method node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `command` or `inputArguments` (or one of its items) is a null reference (Nothing in Visual Basic). |

#### OpcMethodNode(IOpcNode, OpcName, OpcNodeId, IOpcMethodCommand, OpcArgument\[\], params OpcArgument\[\])

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

Initializes a new instance of the [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/) class accessible by the `name` and `id` specified with the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) defined by `command` as a child node of the `parent` node given.

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

```csharp
public OpcMethodNode(
    IOpcNode parent,
    OpcName name,
    OpcNodeId id,
    IOpcMethodCommand command,
    OpcArgument[] inputArguments,
    params OpcArgument[] outputArguments)
```

</div>

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

```vbnet
Public Sub New(
    parent As IOpcNode,
    name As OpcName,
    id As OpcNodeId,
    command As IOpcMethodCommand,
    inputArguments As OpcArgument(),
    ParamArray outputArguments As OpcArgument())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `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/) through that the new method node can be accessed. |
| `id` | [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/) through that the new method node can be identified and accessed. |
| `command` | [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) | The [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) to call on method invokation of the new method node. |
| `inputArguments` | [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/)[] | An array of [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances representing the arguments consumed by the method node. |
| `outputArguments` | params [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/)[] | An array of [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances representing the arguments produced by the method node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `command`, `inputArguments` (or one of its items) or `outputArguments` (or one of its items) is a null reference (Nothing in Visual Basic). |

## Properties

### Callback

Gets the [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) of the method to invoke in case there this method node is called.

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

```csharp
public Delegate Callback { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Callback As [Delegate]
```

</div>

**Property value**

[Delegate](https://learn.microsoft.com/dotnet/api/system.delegate)

The [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) to invoke on method call or a null reference (Nothing in Visual Basic) if [Command](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#command) is used instead of a delegate.

### CanExecute

Gets or sets a value indicating whether the method can be called.

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

```csharp
public bool CanExecute { get; set; }
```

</div>

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

```vbnet
Public Property CanExecute As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if the method can be called; otherwise the value false.

**Exceptions**

| Exception | Condition |
|---|---|
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The property can't changed in case there [Command](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#command) is used for the current [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/). |

### CanUserExecute

Gets or sets a value indicating whether the method can be called by the current user.

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

```csharp
public bool CanUserExecute { get; set; }
```

</div>

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

```vbnet
Public Property CanUserExecute As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if the method can be called by the current user; otherwise the value false.

**Exceptions**

| Exception | Condition |
|---|---|
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The property can't changed in case there [Command](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#command) is used for the current [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/). |

### Command

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

Gets the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) of the method to invoke in case there this method node is called.

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

```csharp
public IOpcMethodCommand Command { get; set; }
```

</div>

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

```vbnet
Public Property Command As IOpcMethodCommand
```

</div>

**Property value**

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

An instance implementing the [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) interface through that the method call is to be handled or a null reference (Nothing in Visual Basic) if [Callback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#callback) is used instead of a command.

### DefaultReferenceTypeId

<span class="api-meta">protected · override</span>

Gets the default identifier which identifies the type that defines the underlying node reference within this [OpcInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/) is referenced by its parent node.

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

```csharp
protected override OpcNodeId DefaultReferenceTypeId { get; }
```

</div>

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

```vbnet
Protected Overrides ReadOnly Property DefaultReferenceTypeId As OpcNodeId
```

</div>

**Property value**

[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/) of the reference wihin this [OpcInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/) is referenced. These reference defines the typical behaviour of an instance node and its role in the address space regarding its parent. If there exists no specific reference type a null reference (Nothing in Visual Basic).

**Overrides**

[DefaultReferenceTypeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/members#defaultreferencetypeid)

### InputArguments

Gets a read-only collection of [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances representing the arguments consumed by the method node.

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

```csharp
public OpcReadOnlyArgumentCollection InputArguments { get; }
```

</div>

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

```vbnet
Public ReadOnly Property InputArguments As OpcReadOnlyArgumentCollection
```

</div>

**Property value**

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

An instance of the [OpcReadOnlyArgumentCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreadonlyargumentcollection/) class with the [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances used to define which arguments are consumed by the method node. In case there the collection is empty, the method does not accept any argument.

### OutputArguments

Gets a read-only collection of [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances representing the arguments produced by the method node.

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

```csharp
public OpcReadOnlyArgumentCollection OutputArguments { get; }
```

</div>

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

```vbnet
Public ReadOnly Property OutputArguments As OpcReadOnlyArgumentCollection
```

</div>

**Property value**

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

An instance of the [OpcReadOnlyArgumentCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreadonlyargumentcollection/) class with the [OpcArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcargument/) instances used to define which arguments are produced by the method node. In case there the collection is empty, the method does not return any argument.

## Methods

### Call

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

Calls the method represented by this node on its parent node using the `inputArguments` specified.

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

```csharp
public void Call(
    OpcContext context,
    List<object> inputArguments,
    List<object> outputArguments)
```

</div>

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

```vbnet
Public Sub [Call](
    context As OpcContext,
    inputArguments As List(Of Object),
    outputArguments As List(Of Object))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) to use to call the method. |
| `inputArguments` | [List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)&lt;[Object](https://learn.microsoft.com/dotnet/api/system.object)&gt; | The values of the input arguments in the order of the [InputArguments](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#inputarguments). |
| `outputArguments` | [List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)&lt;[Object](https://learn.microsoft.com/dotnet/api/system.object)&gt; | The list to which the values of the output arguments are added. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `context`, `inputArguments` or `outputArguments` is a null reference (Nothing in Visual Basic). |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The call failed, e.g. with [BadArgumentsMissing](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badargumentsmissing) if the number of `inputArguments` differs from the number of [InputArguments](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#inputarguments), or with [BadInvalidArgument](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badinvalidargument) if an input argument is invalid. |

### InitializeDefaults

<span class="api-meta">protected · override</span>

Initializes the default values used by the [OpcInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/).

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

```csharp
protected override void InitializeDefaults()
```

</div>

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

```vbnet
Protected Overrides Sub InitializeDefaults()
```

</div>

**Overrides**

[InitializeDefaults](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/members#initializedefaults)

**Remarks**

This method is used to ensure the availability of appropriate node specific default values. For more information like when this method is to be overwritten see [InitializeDefaults](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnode/members#initializedefaults).

### ReadAttributeValueCore

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

Determines the value of the attribute to read. In case there a [Command](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#command) is used, the command determines the value of the [Executable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#executable) and [UserExecutable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#userexecutable) attributes; otherwise the value is determined as by the base class.

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

```csharp
protected override OpcAttributeValue<T> ReadAttributeValueCore<T>(
    OpcReadAttributeValueContext context,
    OpcAttributeValue<T> value)
```

</div>

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

```vbnet
Protected Overrides Function ReadAttributeValueCore(Of T)(
    context As OpcReadAttributeValueContext,
    value As OpcAttributeValue(Of T)) As OpcAttributeValue(Of T)
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of attribute value to read. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcReadAttributeValueContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreadattributevaluecontext/) | The [OpcReadAttributeValueContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreadattributevaluecontext/) to use to read the attribute value. |
| `value` | [OpcAttributeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributevalue-1/)&lt;T&gt; | The preliminary [OpcAttributeValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributevalue-1/). |

**Returns**

[OpcAttributeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributevalue-1/)&lt;T&gt;

The determined [OpcAttributeValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributevalue-1/).

**Overrides**

[ReadAttributeValueCore&lt;T&gt;(OpcReadAttributeValueContext, OpcAttributeValue&lt;T&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnode/members#readattributevaluecore)

### WriteAttributeValueCore

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

Determines the value of the attribute to write. In case there a [Command](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#command) is used, no attribute can be written; otherwise the value is determined as by the base class.

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

```csharp
protected override OpcAttributeValue<T> WriteAttributeValueCore<T>(
    OpcWriteAttributeValueContext context,
    OpcAttributeValue<T> value)
```

</div>

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

```vbnet
Protected Overrides Function WriteAttributeValueCore(Of T)(
    context As OpcWriteAttributeValueContext,
    value As OpcAttributeValue(Of T)) As OpcAttributeValue(Of T)
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of attribute value to write. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcWriteAttributeValueContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwriteattributevaluecontext/) | The [OpcWriteAttributeValueContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwriteattributevaluecontext/) to use to write the attribute value. |
| `value` | [OpcAttributeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributevalue-1/)&lt;T&gt; | The [OpcAttributeValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributevalue-1/) to write. |

**Returns**

[OpcAttributeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributevalue-1/)&lt;T&gt;

The [OpcAttributeValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributevalue-1/) written.

**Exceptions**

| Exception | Condition |
|---|---|
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | A [Command](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#command) is used ([BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported)). |

**Overrides**

[WriteAttributeValueCore&lt;T&gt;(OpcWriteAttributeValueContext, OpcAttributeValue&lt;T&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnode/members#writeattributevaluecore)
