OpcArrayDimensions Members

Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcArrayDimensions type exposes the following members.

OpcArrayDimensions(params uint[])

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

C#

public OpcArrayDimensions(params uint[] lengths)


Parameters

lengths UInt32[]

An array its items representing the lengths of the dimensions to represent.

Length

Gets the total number of elements in all the dimensions.

C#

public long Length { get; }


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.

C#

public int Rank { get; }


Property Value

Int32

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

this[int]

Gets the length of the dimension specified.

C#

public uint this[int dimension] { get; }


Property Value

UInt32

The length of the specified dimension.

CreateArray(Type)

Creates an Array of the specified elementType and dimensions represented.

C#

public Array CreateArray(Type elementType)


Parameters

elementType Type

The 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

NotSupportedException

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

C#

public IEnumerator<uint> GetEnumerator()


Returns

IEnumerator<UInt32>

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

GetLength(int)

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

C#

public long GetLength(int dimension)


Parameters

dimension Int32

A 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

ArgumentOutOfRangeException

The dimension is less than zero or equals to or greater than Rank.

GetLowerBound(int)

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

C#

public long GetLowerBound(int dimension)


Parameters

dimension Int32

A 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

ArgumentOutOfRangeException

The dimension is less than zero or equals to or greater than Rank.

GetUpperBound(int)

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

C#

public long GetUpperBound(int dimension)


Parameters

dimension Int32

A 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

ArgumentOutOfRangeException

The dimension is less than zero or equals to or greater than Rank.

ToString()

Returns a string that represents the OpcArrayDimensions.

C#

public override string ToString()


Returns

String

A String representing the OpcArrayDimensions.