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.
public OpcArrayDimensions(params uint[] lengths)Public Sub New(ParamArray lengths As UInteger())Parameters
| Name | Type | Description |
|---|---|---|
lengths | params 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.
public long Length { get; }Public ReadOnly Property Length As LongProperty value
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.
public int Rank { get; }Public ReadOnly Property Rank As IntegerProperty value
The rank (number of dimensions) or zero if there are no dimensions defined.
Methods
CreateArray
Creates an Array of the specified elementType and dimensions represented.
public Array CreateArray(Type elementType)Public Function CreateArray(elementType As Type) As ArrayParameters
| Name | Type | Description |
|---|---|---|
elementType | Type | The Type of the Array to create. |
Returns
A new Array of the specified Type with the length for each dimension represented, using zero-based indexing.
Exceptions
| Exception | Condition |
|---|---|
| Not | 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.
public IEnumerator<uint> GetEnumerator()Public Function GetEnumerator() As IEnumerator(Of UInteger)Returns
An enumerator that can be used to iterate through the dimensions.
Implements
GetLength
Gets a 32-bit integer that represents the number of elements in the specified dimension of the array.
public long GetLength(int dimension)Public Function GetLength(dimension As Integer) As LongParameters
| Name | Type | Description |
|---|---|---|
dimension | Int32 | A zero-based dimension of the array whose length needs to be determined. |
Returns
A 32-bit integer that represents the number of elements in the specified dimension of the array.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The 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.
public long GetLowerBound(int dimension)Public Function GetLowerBound(dimension As Integer) As LongParameters
| Name | Type | Description |
|---|---|---|
dimension | Int32 | A zero-based dimension of the array whose starting index needs to be determined. |
Returns
The index of the first element of the specified dimension in the array.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The 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.
public long GetUpperBound(int dimension)Public Function GetUpperBound(dimension As Integer) As LongParameters
| Name | Type | Description |
|---|---|---|
dimension | Int32 | A zero-based dimension of the array whose upper bound needs to be determined. |
Returns
The index of the last element of the specified dimension in the array, or -1 if the specified dimension is empty.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The dimension is less than zero or equals to or greater than Rank. |
ToString
Returns a string that represents the OpcArrayDimensions.
public override string ToString()Public Overrides Function ToString() As StringReturns
A string representing the OpcArrayDimensions.
Overrides
Indexers
Item
Gets the length of the dimension specified.
public uint this[int dimension] { get; }Public ReadOnly Default Property this[](dimension As Integer) As UIntegerParameters
| Name | Type | Description |
|---|---|---|
dimension | Int32 | The zero-based dimension of the length to get. |
Property value
The length of the specified dimension.
Implements

