Skip to content

Reference

OpcArrayDimensions Members

Provides the lengths of array dimensions.

Reference

OpcArrayDimensions Members ​

Type
OpcArrayDimensions
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Also in
Opc.UaFx.Client

Constructors ​

OpcArrayDimensions ​

Initializes a new instance of the OpcArrayDimensions class with the lengths of dimensions to represent.

csharp
public OpcArrayDimensions(params uint[] lengths)
vbnet
Public Sub New(ParamArray lengths As UInteger())

Parameters

NameTypeDescription
lengthsparams UInt32[]An array its items representing the lengths of the dimensions to represent.

Properties ​

Length ​

Gets the total number of elements in all the dimensions.

csharp
public long Length { get; }
vbnet
Public ReadOnly Property Length As Long

Property value

Int64

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

Rank ​

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

csharp
public int Rank { get; }
vbnet
Public ReadOnly Property Rank As Integer

Property value

Int32

The rank (number of dimensions) or zero if there are no dimensions defined.

Methods ​

CreateArray ​

since v2.22

Creates an Array of the specified elementType and dimensions represented.

csharp
public Array CreateArray(Type elementType)
vbnet
Public Function CreateArray(elementType As Type) As Array

Parameters

NameTypeDescription
elementTypeTypeThe Type of the Array to create.

Returns

Array

A new Array of the specified Type with the length for each dimension represented, using zero-based indexing.

Exceptions

ExceptionCondition
NotSupportedExceptionThe elementType is not supported. For example, void is not supported or elementType is an open generic type.

GetEnumerator ​

Returns an enumerator that iterates through the dimensions.

csharp
public IEnumerator<uint> GetEnumerator()
vbnet
Public Function GetEnumerator() As IEnumerator(Of UInteger)

Returns

IEnumerator<UInt32>

An enumerator that can be used to iterate through the dimensions.

Implements

GetEnumerator()

GetLength ​

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

csharp
public long GetLength(int dimension)
vbnet
Public Function GetLength(dimension As Integer) As Long

Parameters

NameTypeDescription
dimensionInt32A zero-based dimension of the array whose length needs to be determined.

Returns

Int64

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

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe dimension is less than zero or equals to or greater than Rank.

GetLowerBound ​

Gets the index of the first element of the specified dimension in the array.

csharp
public long GetLowerBound(int dimension)
vbnet
Public Function GetLowerBound(dimension As Integer) As Long

Parameters

NameTypeDescription
dimensionInt32A zero-based dimension of the array whose starting index needs to be determined.

Returns

Int64

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

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe dimension is less than zero or equals to or greater than Rank.

GetUpperBound ​

Gets the index of the last element of the specified dimension in the array.

csharp
public long GetUpperBound(int dimension)
vbnet
Public Function GetUpperBound(dimension As Integer) As Long

Parameters

NameTypeDescription
dimensionInt32A zero-based dimension of the array whose upper bound needs to be determined.

Returns

Int64

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

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe dimension is less than zero or equals to or greater than Rank.

ToString ​

override

Returns a string that represents the OpcArrayDimensions.

csharp
public override string ToString()
vbnet
Public Overrides Function ToString() As String

Returns

String

A string representing the OpcArrayDimensions.

Overrides

ToString()

Indexers ​

Item ​

Gets the length of the dimension specified.

csharp
public uint this[int dimension] { get; }
vbnet
Public ReadOnly Default Property this[](dimension As Integer) As UInteger

Parameters

NameTypeDescription
dimensionInt32The zero-based dimension of the length to get.

Property value

UInt32

The length of the specified dimension.

Implements

this[int]