# OpcAttributeValue&lt;T&gt; Members

> Reference: Represents the immutable value of an attribute.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcAttributeValue&lt;T&gt;</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>

## Constructors

### OpcAttributeValue

Initializes a new instance of the [OpcAttributeValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributevalue-1/) class using the specified `attribute` and `value`.

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

```csharp
public OpcAttributeValue(OpcAttribute attribute, T value)
```

</div>

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

```vbnet
Public Sub New(attribute As OpcAttribute, value As T)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `attribute` | [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) | The [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) member which identifies the type of attribute its value is represented. |
| `value` | T | The value of the type `T` of the attribute value represented. |

## Properties

### Attribute

Gets the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) member which identifies the type of attribute its value is represented.

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

```csharp
public OpcAttribute Attribute { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Attribute As OpcAttribute
```

</div>

**Property value**

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

One of the members defined by the [OpcAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/) enumeration.

### Value

Gets the value of the attribute represented.

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

```csharp
public T Value { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Value As T
```

</div>

**Property value**

T

The value of the type `T` of the attribute value represented.

## Methods

### ToString

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

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

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

```csharp
public override string ToString()
```

</div>

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

```vbnet
Public Overrides Function ToString() As String
```

</div>

**Returns**

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

A string that represents the current [OpcAttributeValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributevalue-1/) including the [Attribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributevalue-1/members#attribute) and [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattributevalue-1/members#value).

**Overrides**

[ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)
