FixedArray struct | QSYS API Reference Guide

Estimated reading time: 3 minutes

Defines the functionality of a fixed-sized unidimensional array.

Namespace: ASNA.QSys.Runtime Assembly: ASNA.QSys.Runtime.dll



Properties

Type Name Description
T[] Array Gets the array that holds the T elements of the FixedArray.
T Item Indexer over the array, gets or sets the element at that position.
Int32 Length Gets the number of elements in the FixedArray.
Object ValueAsObject Gets a copy of the array that holds the T elements, as an object.

Methods

Signature Description
Clear() Clears all elements of the array to their default value.
CompareTo(Object) Compare To object.
CopyFrom(T[], Int32) Copy elements of a T[] into this array, starting at the given position.
GetEnumerator() Get an IEnumerator to iterate over the elements of the array.
Initialize(T) Initializes all elements of the array to the given value.
op_Explicit(FixedArray<TDim, T>) Explicit cast from FixedArray to T[]
op_Implicit(T[]) Implicit cast from T[] to FixedArray.
Sort(Boolean, Int32, Int32) Order elements of the array according to their value, using the default comparison for type T.

void Clear()

Clears all elements of the array to their default value.

void Clear()

int CompareTo(object obj)

Compare To object.

int CompareTo(object obj)

Parameters

Type Parameter name Description
Object obj Object to compare.

Returns

Type Description
Int32 A 32-bit signed integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the obj parameter.

void CopyFrom(T[] sourceArray, int targetStartAt)

Copy elements of a T[] into this array, starting at the given position.

void CopyFrom(T[] sourceArray, int targetStartAt)

Parameters

Type Parameter name Description
T[] sourceArray The array from where to copy.
Int32 targetStartAt The starting index in this array. Default is 0.

IEnumerator GetEnumerator()

Get an IEnumerator to iterate over the elements of the array.

IEnumerator<T> GetEnumerator()

void Initialize(T val)

Initializes all elements of the array to the given value.

void Initialize(T val)

Parameters

Type Parameter name Description
T val The value to copy into all array elements.

T[] op_Explicit(FixedArray<TDim, T> fixedArray)

Explicit cast from FixedArray to T[]

T[] op_Explicit(FixedArray<TDim, T> fixedArray)

FixedArray<TDim, T> op_Implicit(T[] array)

Implicit cast from T[] to FixedArray.

FixedArray<TDim, T> op_Implicit(T[] array)

void Sort(bool ascending, int start, int length)

Order elements of the array according to their value, using the default comparison for type T.

void Sort(bool ascending, int start, int length)

Parameters

Type Parameter name Description
Boolean ascending True for ascending order. Default is true.
Int32 start Index of the element where the sort starts. Default is 0.
Int32 length How many elements to sort. Default is -1, sort the whole array.