# OpcMethodCommands Members

> Reference: Provides a set of static (Shared in Visual Basic) IOpcMethodCommand instances.

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

## Properties

### NotImplemented

<span class="api-meta">static</span>

Gets an [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) its executability evaluates to the value true while its implementation always returns the OPC UA related [OpcResult](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcresult/) using the [OpcStatusCode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/) member [BadNotImplemented](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotimplemented). Use this command in case there the method implementation is still in progress.

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

```csharp
public static IOpcMethodCommand NotImplemented { get; }
```

</div>

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

```vbnet
Public Shared ReadOnly Property NotImplemented As IOpcMethodCommand
```

</div>

**Property value**

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

An executable command its execution results to [BadNotImplemented](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotimplemented).

## Methods

### Execute

<span class="api-meta">static · since v2.24</span>

Provides an [IOpcMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcmethodcommand/) is executability evaluates to the value true while its implementation invokes the `callback` specified.

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

```csharp
public static IOpcMethodCommand Execute(
    OpcMethodCommands.ExecuteDelegate callback)
```

</div>

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

```vbnet
Public Shared Function Execute(
    callback As OpcMethodCommands.ExecuteDelegate) As IOpcMethodCommand
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `callback` | [OpcMethodCommands.ExecuteDelegate](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodcommands.executedelegate/) | The [OpcMethodCommands.ExecuteDelegate](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodcommands.executedelegate/) to invoke whenever the command is executed. |

**Returns**

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

A new instance of an executable command its execution will invoke the `callback` specified.

**Exceptions**

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

### ExecuteAsync

<span class="api-meta">static · since v2.24</span>

Provides an [IOpcAsyncMethodCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcasyncmethodcommand/) is executability evaluates to the value true while its implementation invokes the `callback` specified.

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

```csharp
public static IOpcAsyncMethodCommand ExecuteAsync(
    OpcMethodCommands.ExecuteAsyncDelegate callback)
```

</div>

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

```vbnet
Public Shared Function ExecuteAsync(
    callback As OpcMethodCommands.ExecuteAsyncDelegate) As IOpcAsyncMethodCommand
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `callback` | [OpcMethodCommands.ExecuteAsyncDelegate](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodcommands.executeasyncdelegate/) | The [OpcMethodCommands.ExecuteAsyncDelegate](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodcommands.executeasyncdelegate/) to invoke whenever the command is executed. |

**Returns**

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

A new instance of an executable command its execution will invoke the async `callback` specified.

**Exceptions**

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