# SalArray

Namespace: **PPJ.Runtime**

Assembly: **PPJ.Runtime.49** (4.9.0.0)

Dynamic array class. This class replicates SAL dynamic arrays. It must be declared as an inner class of the class that should be used as the type of the elements of the dynamic array.

{% tabs %}
{% tab title="C#" %}

```csharp
public class SalArray : IList, ICollection, IEnumerable, IXmlSerializable, ISalType
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class SalArray
    Inherits IList
    Implements ICollection, IEnumerable, IXmlSerializable, ISalType
```

{% endtab %}
{% endtabs %}

## Properties

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Count

[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32): Number of array elements

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Dimensions

[SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray): Returns the number of dimensions.

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)IsDynamic

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Returns true if the array is dynamic.

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)IsEmpty

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Returns true if the array is empty.

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)IsMultidimensional

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Returns true if the array is an MD array.

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)IsSynchronized

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): IsSynchronized

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Item(indices)

[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object): Get/Set functions used to access the array. The implementation classes will call these methods from their indexers.

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Length

[SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray): Returns the total number of items in the array. For MD arrays returns the number of items in the first dimension.

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SyncRoot

[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object): SynchRoot

## Methods

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Add(value)

Appends one item to the array.

| Parameter | Type                                                                | Description |
| --------- | ------------------------------------------------------------------- | ----------- |
| **value** | [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) |             |

**Returns:** [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)AddRange(collection)

Appends the collection of items to the array.

| Parameter      | Type                                                                                      | Description |
| -------------- | ----------------------------------------------------------------------------------------- | ----------- |
| **collection** | [IEnumerable](https://docs.microsoft.com/en-us/dotnet/api/system.collections.ienumerable) |             |

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Avg()

Returns the average value of all the numbers in an array.

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray). nAvg

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Clear()

Clears a dynamic array

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)CopyTo(array, index)

CopyTo

| Parameter | Type                                                              | Description |
| --------- | ----------------------------------------------------------------- | ----------- |
| **array** | [Array](https://docs.microsoft.com/en-us/dotnet/api/system.array) |             |
| **index** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)DimCount()

Returns the number of dimensions in an array.

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)DimCount(nDim)

| Parameter | Type                                                                                        | Description |
| --------- | ------------------------------------------------------------------------------------------- | ----------- |
| **nDim**  | [SalNumber&](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Fill(value, count)

Fills an array with the specified value.

| Parameter | Type                                                                | Description |
| --------- | ------------------------------------------------------------------- | ----------- |
| **value** | [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) |             |
| **count** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)   |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Find(value, start)

Finds the value in the array. This is allowed only for single-dimension arrays.

| Parameter | Type                                                                | Description |
| --------- | ------------------------------------------------------------------- | ----------- |
| **value** | [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) |             |
| **start** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)   |             |

**Returns:** [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media)FromNativeArray(array)

Creates a SalArray from a native array. The type is inferred from the array.

| Parameter | Type                                                              | Description                            |
| --------- | ----------------------------------------------------------------- | -------------------------------------- |
| **array** | [Array](https://docs.microsoft.com/en-us/dotnet/api/system.array) | Native array to convert to a SalArray. |

**Returns:** [SalArray](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media)FromNativeArray(array, dbType)

Creates a SalArray from a native array of the specified *dbType* .

| Parameter  | Type                                                                     | Description                                  |
| ---------- | ------------------------------------------------------------------------ | -------------------------------------------- |
| **array**  | [Array](https://docs.microsoft.com/en-us/dotnet/api/system.array)        | Native array to convert to a SalArray.       |
| **dbType** | [DbType](https://docs.microsoft.com/en-us/dotnet/api/system.data.dbtype) | Type of the elements in the source *array* . |

**Returns:** [SalArray](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetArray(capacity)

Returns the wrapped native array and ensures that the requested element is created for dynamic arrays.

| Parameter    | Type                                                                  | Description |
| ------------ | --------------------------------------------------------------------- | ----------- |
| **capacity** | [Int32\[\]](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

**Returns:** [Array](https://docs.microsoft.com/en-us/dotnet/api/system.array).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetElementType()

Returns the type of the array elements

**Returns:** [Type](https://docs.microsoft.com/en-us/dotnet/api/system.type).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetEnumerator()

IEnumerator implementation to support the foreach statement.

**Returns:** [IEnumerator](https://docs.microsoft.com/en-us/dotnet/api/system.collections.ienumerator).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetLength(dim)

Returns the number of items in the array

| Parameter | Type                                                              | Description          |
| --------- | ----------------------------------------------------------------- | -------------------- |
| **dim**   | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) | dimension, first = 1 |

**Returns:** [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetLowerBound(dim)

Returns the lower bound of the array.

| Parameter | Type                                                              | Description |
| --------- | ----------------------------------------------------------------- | ----------- |
| **dim**   | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetLowerBound(dim, lbound)

| Parameter  | Type                                                                                        | Description |
| ---------- | ------------------------------------------------------------------------------------------- | ----------- |
| **dim**    | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)                           |             |
| **lbound** | [SalNumber&](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetUpperBound(dim)

Returns the upper bound of an array.

| Parameter | Type                                                              | Description |
| --------- | ----------------------------------------------------------------- | ----------- |
| **dim**   | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetUpperBound(dim, ubound)

| Parameter  | Type                                                                                        | Description |
| ---------- | ------------------------------------------------------------------------------------------- | ----------- |
| **dim**    | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)                           |             |
| **ubound** | [SalNumber&](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Insert(index)

Inserts an item at the position. This is allowed only for single-dimension arrays.

| Parameter | Type                                                              | Description |
| --------- | ----------------------------------------------------------------- | ----------- |
| **index** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)MakeDynamic()

Makes the array dynamic.

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Max()

Returns the maximum value in an array of numbers.

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Min()

Returns the minimum value in an array of numbers.

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)QueryBounds(min, max)

| Parameter | Type                                                                                        | Description |
| --------- | ------------------------------------------------------------------------------------------- | ----------- |
| **min**   | [SalNumber&](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray) |             |
| **max**   | [SalNumber&](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray) |             |

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Remove(index)

Removes the item at the index. This is allowed only for single-dimension arrays.

| Parameter | Type                                                              | Description |
| --------- | ----------------------------------------------------------------- | ----------- |
| **index** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Reset()

Resets a dynamic array

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetBounds(lower, upper)

Sets the lower and upper bound of an array for the first dimension only. NOTE: In SAL this function was named SalSetArrayBounds().

| Parameter | Type                                                              | Description |
| --------- | ----------------------------------------------------------------- | ----------- |
| **lower** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |
| **upper** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetLength(dim, length)

Changes the number of items in the array

| Parameter  | Type                                                              | Description          |
| ---------- | ----------------------------------------------------------------- | -------------------- |
| **dim**    | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) | dimension, first = 1 |
| **length** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |                      |

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetLowerBound(dim, bound)

Changes the lower bound of the array

| Parameter | Type                                                              | Description |
| --------- | ----------------------------------------------------------------- | ----------- |
| **dim**   | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |
| **bound** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetUpperBound(dim, bound)

Sets the upper bound of an array. The first dimension is 1.

| Parameter | Type                                                              | Description |
| --------- | ----------------------------------------------------------------- | ----------- |
| **dim**   | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |
| **bound** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) |             |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Sort(index, count, comparer)

Sorts the items in the array.

| Parameter    | Type                                                                                  | Description |
| ------------ | ------------------------------------------------------------------------------------- | ----------- |
| **index**    | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)                     |             |
| **count**    | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)                     |             |
| **comparer** | [IComparer](https://docs.microsoft.com/en-us/dotnet/api/system.collections.icomparer) |             |

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Sort(comparer)

Sorts the items in the array.

| Parameter    | Type                                                                                  | Description |
| ------------ | ------------------------------------------------------------------------------------- | ----------- |
| **comparer** | [IComparer](https://docs.microsoft.com/en-us/dotnet/api/system.collections.icomparer) |             |

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Sum()

Returns the sum of the elements in an array of numbers.

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ToNativeArray()

Converts to an array of native types.

**Returns:** [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object).

## Inherited By

| Name                                                                                          | Description                                                                                                                                                      |
| --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [SalArray\<T>](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray) | Dynamic array generic class. This class replicates SAL dynamic arrays. It can be used without being declared as an inner class by using the new generics syntax. |

## Implements

| Name                                                                                      | Description                          |
| ----------------------------------------------------------------------------------------- | ------------------------------------ |
| [ISalType](https://desktop-api.iceteagroup.com/ppj.runtime.49/types/ppj.runtime.salarray) | Common base interface for Sal types. |
