# OpcNodeTypeMemberAttribute Members

> Reference: Declares a field or property of a custom node type, to that the member belongs on that this attribute is applied, with different Name and Type information to use when reading and writing the member.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcNodeTypeMemberAttribute</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 [Attribute](https://learn.microsoft.com/dotnet/api/system.attribute).

## Constructors

### OpcNodeTypeMemberAttribute

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

| Overload | Description |
|---|---|
| [OpcNodeTypeMemberAttribute()](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypememberattribute/members#opcnodetypememberattribute-noparams) | Initializes a new instance of the [OpcNodeTypeMemberAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypememberattribute/) class. |
| [OpcNodeTypeMemberAttribute(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypememberattribute/members#opcnodetypememberattribute-system-string) | Initializes a new instance of the [OpcNodeTypeMemberAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypememberattribute/) class using an alternative `name` specified for the member on that the [OpcNodeTypeMemberAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypememberattribute/) has been declared. |

#### OpcNodeTypeMemberAttribute()

Initializes a new instance of the [OpcNodeTypeMemberAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypememberattribute/) class. Use this constructor in case you want to explicitly declare that the default [Type](https://learn.microsoft.com/dotnet/api/system.type) and default [Name](https://learn.microsoft.com/dotnet/api/system.reflection.memberinfo.name) of a node type member is used.

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

```csharp
public OpcNodeTypeMemberAttribute()
```

</div>

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

```vbnet
Public Sub New()
```

</div>

#### OpcNodeTypeMemberAttribute(string)

Initializes a new instance of the [OpcNodeTypeMemberAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypememberattribute/) class using an alternative `name` specified for the member on that the [OpcNodeTypeMemberAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypememberattribute/) has been declared.

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

```csharp
public OpcNodeTypeMemberAttribute(string name)
```

</div>

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

```vbnet
Public Sub New(name As String)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The alternative name to use for the member. |

**Exceptions**

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

## Properties

### Description

Gets or sets a human readable text that describes the member.

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

```csharp
public string Description { get; set; }
```

</div>

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

```vbnet
Public Property Description As String
```

</div>

**Property value**

[String](https://learn.microsoft.com/dotnet/api/system.string)

A value which captures any semantic information that whould help a human to unterstand what is contained in the member.

### Name

Gets the alternative name to use for the member this attribute belongs to.

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

```csharp
public string Name { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Name As String
```

</div>

**Property value**

[String](https://learn.microsoft.com/dotnet/api/system.string)

The alternative name to use for the member or a null reference (Nothing in Visual Basic) in case there is no alternative name for the member declared an its [Name](https://learn.microsoft.com/dotnet/api/system.reflection.memberinfo.name) shall be used.

### Type

Gets or sets the alternative [Type](https://learn.microsoft.com/dotnet/api/system.type) to use for the member this attribute belongs to. Keep in mind to declare only different types which implement [IConvertible](https://learn.microsoft.com/dotnet/api/system.iconvertible) supporting the [Type](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypememberattribute/members#type) specified; otherwise declare the desired type directly instead of using this attribute.

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

```csharp
public Type Type { get; set; }
```

</div>

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

```vbnet
Public Property Type As Type
```

</div>

**Property value**

[Type](https://learn.microsoft.com/dotnet/api/system.type)

The [Type](https://learn.microsoft.com/dotnet/api/system.type) to use for the member or a null reference (Nothing in Visual Basic) in case there is no alternative [Type](https://learn.microsoft.com/dotnet/api/system.type) for the member declared and its [FieldType](https://learn.microsoft.com/dotnet/api/system.reflection.fieldinfo.fieldtype) or [PropertyType](https://learn.microsoft.com/dotnet/api/system.reflection.propertyinfo.propertytype) shall be used.
