# OpcVariableTypeInfo Members

> Reference: Represents type declarations used for variable node types.

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

Inherits members from [OpcNodeTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/members).

## Properties

### ArrayDimensions

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

Gets the length for each dimension of an array value of the variable type represented.

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

```csharp
public abstract uint[] ArrayDimensions { get; }
```

</div>

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

```vbnet
Public MustOverride ReadOnly Property ArrayDimensions As UInteger()
```

</div>

**Property value**

[UInt32](https://learn.microsoft.com/dotnet/api/system.uint32)[]

A null reference (Nothing in Visual Basic) in case there the value of the variable type represented is a scalar value; otherwise an [uint](https://learn.microsoft.com/dotnet/api/system.uint32) array there each entry indicates a single dimension while the value of the entry defines the length of that dimension.

### ArrayLength

Gets the total number of elements in all the dimensions of the array value of the variable type represented.

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

```csharp
public long ArrayLength { get; }
```

</div>

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

```vbnet
Public ReadOnly Property ArrayLength As Long
```

</div>

**Property value**

[Int64](https://learn.microsoft.com/dotnet/api/system.int64)

The total number of elements in all the dimensions of the array value of the variable type represented; zero if there are no elements in the array.

### ArrayRank

Gets the rank (number of dimensions) of the array value of the variable type represented. For example, a one-dimensional array returns 1, a two-dimensional array returns 2, and so on.

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

```csharp
public int ArrayRank { get; }
```

</div>

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

```vbnet
Public ReadOnly Property ArrayRank As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The rank (number of dimensions) of the array value of the variable type represented.

### Category

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

Gets the [NodeCategory](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#nodecategory) attribute which identifies the kind of node and is therefore used to classify the node regarding its use and purpose.

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

```csharp
public override sealed OpcNodeCategory Category { get; }
```

</div>

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

```vbnet
Public NotOverridable Overrides ReadOnly Property Category As OpcNodeCategory
```

</div>

**Property value**

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

The [OpcVariableTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletypeinfo/) always provides the [VariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodecategory/#variabletype).

**Overrides**

[Category](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/members#category)

### DataType

Gets the built-in data type of the value of the variable type represented.

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

```csharp
public OpcDataType DataType { get; }
```

</div>

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

```vbnet
Public ReadOnly Property DataType As OpcDataType
```

</div>

**Property value**

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

The member of [OpcDataType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatype/) which represents the [DataTypeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletypeinfo/members#datatypeid) (see [GetDataType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatypes/members#getdatatype-opc-uafx-opcnodeid)).

### DataTypeId

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

Gets the identifier of the data type of the value of the variable type represented.

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

```csharp
public abstract OpcNodeId DataTypeId { get; }
```

</div>

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

```vbnet
Public MustOverride ReadOnly Property DataTypeId 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 data type node which defines the type of data of the value of the variable type.

### IsArray

Gets a value indicating whether the value of the variable represented is an array.

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

```csharp
public bool IsArray { get; }
```

</div>

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

```vbnet
Public ReadOnly Property IsArray As Boolean
```

</div>

**Property value**

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

The value true if the value of the variable represented is an array; otherwise the false.

### ValueRank

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

Gets the value rank of the value of the variable type represented.

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

```csharp
public abstract int ValueRank { get; }
```

</div>

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

```vbnet
Public MustOverride ReadOnly Property ValueRank As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The value of the [ValueRank](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#valuerank) attribute which indicates whether the value is a scalar or an array and the number of its dimensions, as defined by OPC UA.

## Methods

### AttributeValue

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

Retrieves the value of the `attribute` specified.

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

```csharp
public override object AttributeValue(OpcAttribute attribute)
```

</div>

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

```vbnet
Public Overrides Function AttributeValue(attribute As OpcAttribute) As Object
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `attribute` | [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 which identifies the attribute its value is queried. |

**Returns**

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

The value of the `attribute` specified or a null reference (Nothing in Visual Basic) in case there the value of the attribute is a null reference or it is not supported by the current [OpcVariableTypeInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletypeinfo/).

**Overrides**

[AttributeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodetypeinfo/members#attributevalue-opc-uafx-opcattribute)

### GetArrayLength

Gets a 32-bit integer that represents the number of elements in the specified dimension of the array value of the variable type.

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

```csharp
public long GetArrayLength(int dimension)
```

</div>

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

```vbnet
Public Function GetArrayLength(dimension As Integer) As Long
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `dimension` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | A zero-based dimension of the array value whose length needs to be determined. |

**Returns**

[Int64](https://learn.microsoft.com/dotnet/api/system.int64)

A 32-bit integer that represents the number of elements in the specified dimension of the array value.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception) | The `dimension` is less than zero or equals to or greater than [ArrayRank](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletypeinfo/members#arrayrank). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The value of the variable type represented is not an array (see [IsArray](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletypeinfo/members#isarray)). |

### GetArrayLowerBound

Gets the index of the first element of the specified dimension in the array value of the variable type.

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

```csharp
public long GetArrayLowerBound(int dimension)
```

</div>

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

```vbnet
Public Function GetArrayLowerBound(dimension As Integer) As Long
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `dimension` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | A zero-based dimension of the array value whose starting index needs to be determined. |

**Returns**

[Int64](https://learn.microsoft.com/dotnet/api/system.int64)

The index of the first element of the specified dimension in the array value.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception) | The `dimension` is less than zero or equals to or greater than [ArrayRank](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletypeinfo/members#arrayrank). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The value of the variable type represented is not an array (see [IsArray](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletypeinfo/members#isarray)). |

### GetArrayUpperBound

Gets the index of the last element of the specified dimension in the array value of the variable type.

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

```csharp
public long GetArrayUpperBound(int dimension)
```

</div>

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

```vbnet
Public Function GetArrayUpperBound(dimension As Integer) As Long
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `dimension` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | A zero-based dimension of the array value whose upper bound needs to be determined. |

**Returns**

[Int64](https://learn.microsoft.com/dotnet/api/system.int64)

The index of the last element of the specified dimension in the array value, or -1 if the specified dimension is empty.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception) | The `dimension` is less than zero or equals to or greater than [ArrayRank](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletypeinfo/members#arrayrank). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The value of the variable type represented is not an array (see [IsArray](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletypeinfo/members#isarray)). |
