PbArray<T> Class
.NET Standard 2.x
Defines a PowerBuilder-style array.
Namespace: PowerScript.Bridge
Assembly: PowerScript.Bridge.dll
Syntax
public class PbArray<T> : IEnumerable<T>
Constructors
| Name | Description |
|---|---|
| PbArray() | Initializes an instance of PbArray<T> class. |
| PbArray(int length) | Initializes an instance of PbArray<T> class. The size of the one-dimensional array is specified. |
| PbArray(int length1, int length2) | Initializes an instance of PbArray<T> class. The size of the two-dimensional array is specified. |
Properties
| Name | Return Type | Description |
|---|---|---|
| ElementType | type | Gets the data type of the elements of PbArray. |
| Length | int | Gets the total number of elements in all the dimensions of PbArray. |
| Item[int] | T | Gets or sets the element at the specified index. |
| Item[int, int] | T | Gets or sets the element at the specified two-dimensional array. |
Methods
| Name | Return Type | Description |
|---|---|---|
| Add(T value) | void | Adds an object to the end of the PbArray. |
| GetEnumerator() | IEnumerator<T> | Returns an enumerator that iterates through the PbArray. |
| GetLowerBound(int dimension) | int | Gets the index of the first element of the specified dimension in the PbArray. |
| GetUpperBound(int dimension) | int | Gets the index of the last element of the specified dimension in the PbArray. |
| GetValue(int index) | T | Gets the value of the specified element in the current PbArray. |
| GetValue(int index1, int index2) | T | Gets the value at the specified position in the two-dimensional PbArray. |
| SetValue(T value, int index) | void | Sets a value to the element at the specified position in the one-dimensional PbArray. |
| SetValue(T value, int index1, int index2) | void | Sets a value to the element at the specified position in the two-dimensional PbArray. |
Operators
| Name | Description |
|---|---|
| Implicit(T[,] to PbArray<T>) | Defines an implicit conversion which converts a two-dimensional object to a PbArray<T> object. |
| Implicit(T[] to PbArray<T>) | Defines an implicit conversion which converts a one-dimensional object to a PbArray<T> object. |
Examples
Coming soon.