# OpcMethodNode Class

<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">OpcMethodNode Members</a></dd>
</dl>

Defines a method node.

## Syntax

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

```csharp
public class OpcMethodNode : OpcInstanceNode
```

</div>

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

```vbnet
Public Class OpcMethodNode
    Inherits OpcInstanceNode
```

</div>

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → [OpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnode/) → [OpcInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/) → **OpcMethodNode**

## Implements

<ul class="api-implements">
<li><a href="../opc.uafx.iopcnode/">IOpcNode</a></li>
<li><a href="../opc.uafx.iopcnodeinfo/">IOpcNodeInfo</a></li>
</ul>

## Derived types

- [OpcActionMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcactionmethodnode/)
- [OpcAddCommentMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddcommentmethodnode/)
- [OpcDialogResponseMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdialogresponsemethodnode/)
- [OpcFileCloseMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfileclosemethodnode/)
- [OpcFileGetPositionMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfilegetpositionmethodnode/)
- [OpcFileOpenMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfileopenmethodnode/)
- [OpcFileReadMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfilereadmethodnode/)
- [OpcFileSetPositionMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfilesetpositionmethodnode/)
- [OpcFileWriteMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcfilewritemethodnode/)
- [OpcMethodNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode-1/)
- [OpcTimedShelveMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctimedshelvemethodnode/)

## Constructors

| Name | Description |
|---|---|
| [OpcMethodNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#opcmethodnode)<span class="api-meta">16 overloads</span> | Initializes a new instance of the OpcMethodNode class accessible by the `name` specified with the [Delegate](https://learn.microsoft.com/dotnet/api/system.delegate) call given by `callback`. |

## Properties

| Name | Description |
|---|---|
| [Callback](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#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. |
| [CanExecute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#canexecute) | Gets or sets a value indicating whether the method can be called. |
| [CanUserExecute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#canuserexecute) | Gets or sets a value indicating whether the method can be called by the current user. |
| [Command](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#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. |
| [DefaultReferenceTypeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#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. |
| [InputArguments](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#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. |
| [OutputArguments](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#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. |

## Methods

| Name | Description |
|---|---|
| [Call](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#call)<span class="api-meta">since v2.33</span> | Calls the method represented by this node on its parent node using the `inputArguments` specified. |
| [InitializeDefaults](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#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/). |
| [ReadAttributeValueCore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#readattributevaluecore)<span class="api-meta">protected · override · since v2.9</span> | Determines the value of the attribute to read. |
| [WriteAttributeValueCore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmethodnode/members#writeattributevaluecore)<span class="api-meta">protected · override · since v2.9</span> | Determines the value of the attribute to write. |

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).

## Applies to

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