SalArray<T>
PPJ.Runtime.SalArray<T>
Last updated
PPJ.Runtime.SalArray<T>
Last updated
Namespace: PPJ.Runtime
Assembly: PPJ.Web.49 (4.9.0.0)
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.
T
Constructs a new dynamic array.
Constructs a new array.
lengths
Constructs a new array. Example: new SalArray("2:3")
bounds
String definition of the array dimensions. It can specify lower bounds as "2:3".
T: Returns or sets the item at the specified index.
T: Returns or sets the item at the specified coordinates in a multidimensional array.
T[]: Returns the internal array.
Adds an object to the end of the array.
item
The object to be added to the end of the array. The value can be null for reference types.
Adds the elements of the specified collection to the end of the array.
collection
The collection whose elements should be added to the end of the array. The collection itself cannot be null, but it can contain elements that are null, if type collection is a reference type.
Throws:
ArgumentNullException collection is null.
Determines whether an element is in the array.
item
The object to locate in the array. The value can be null for reference types.
Returns: Boolean. true if item is found in the array; otherwise, false.
Copies the entire array to a compatible one-dimensional array, starting at the beginning of the target array.
array
Throws:
ArgumentNullException array is null.
ArgumentException The number of elements in the source array is greater than the number of elements that the destination array can contain.
Copies the entire array to a compatible one-dimensional array, starting at the specified index of the target array.
array
arrayIndex
The zero-based index in array at which copying begins.
Throws:
ArgumentNullException array is null.
ArgumentOutOfRangeException arrayIndex is less than 0.
ArgumentException The number of elements in the array is greater than the available space from arrayIndex to the end of the destination array .
Returns the internal array.
Returns: T[].
Returns the internal array resized to guarantee the specified minimum unmber of items.
minLength
The minimum number of items that should be ensured in the array.
Returns: T[].
Returns the internal multidimensional array resized to guarantee the specified number of items in each dimension.
minLength1
The minimum number of items for the first dimension.
minLength2
The minimum number of items for the second dimension.
Returns: T[,].
Returns the internal multidimensional array resized to guarantee the specified number of items in each dimension.
minLength1
The minimum number of items for the first dimension.
minLength2
The minimum number of items for the second dimension.
minLength3
The minimum number of items for the third dimension.
Returns: T[,,].
Returns the internal multidimensional array resized to guarantee the specified number of items in each dimension.
minLength1
The minimum number of items for the first dimension.
minLength2
The minimum number of items for the second dimension.
minLength3
The minimum number of items for the third dimension.
minLength4
The minimum number of items for the fourth dimension.
Returns: T[,,,].
Searches for the specified object and returns the zero-based index of the first occurrence within the entire array.
item
The object to locate in the array. The value can be null for reference types.
Returns: Int32. The zero-based index of the first occurrence of item , if found; otherwise, –1.
Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the array.
item
The object to locate in the array. The value can be null for reference types.
index
The zero-based starting index of the search. 0 (zero) is valid in an empty list.
Returns: Int32. The zero-based index of the first occurrence of item within the range of elements, if found; otherwise, –1.
Throws:
ArgumentOutOfRangeException index is outside the range of valid indexes.
Inserts an element into the array at the specified index.
index
The zero-based index at which item should be inserted.
item
The object to insert. The value can be null for reference types.
Throws:
ArgumentOutOfRangeException index is less than 0; or index is greater than the number of elements in the array.
Inserts the elements of a collection into the array at the specified index.
index
The zero-based index at which the new elements should be inserted.
collection
The collection whose elements should be inserted. The collection itself cannot be null, but it can contain elements that are null, if type collection is a reference type.
Throws:
ArgumentNullException collection is null.
ArgumentOutOfRangeException index is less than 0; or index is greater than the number of elements in the array.
Removes the first occurrence of a specific object from the array.
item
The object to remove from the array. The value can be null for reference types.
Returns: Boolean. true if item is successfully removed; otherwise, false. This method also returns false if item was not found.
Removes the element at the specified index.
index
The zero-based index of the element to remove.
Throws:
ArgumentOutOfRangeException index is less than 0; or index is equal to or greater than number of elements in the array.
Sorts the items in the array using the specified comparison expression.
comparison
The comparison expression.
Common base interface for Sal types.
The one-dimensional that is the destination of the elements copied. The must have zero-based indexing.
The one-dimensional that is the destination of the elements copied. The must have zero-based indexing.