C# 클래스 LitDev.LDArray

파일 보기 프로젝트 열기: litdev1/LitDev

공개 메소드들

메소드 설명
Copy ( Primitive array1, Primitive array2 ) : Primitive

Copy one array to another array. The dimensions of the 2 arrays must be the same.

CopyNew ( Primitive array ) : Primitive

Copy one array to a new array.

CopyToSBArray ( Primitive array ) : Primitive

Copy LDArray type to SmallBasic array type. The reverse operation (SmallBasic to LDArray) isn't possible becuase the SmallBasic indexes are not necessarily contiguous integers. Note also that a SmallBasic array cannot hold an empty string value, so these will not be copied.

Count ( Primitive array ) : Primitive

Get the number of non-empty "" elements in the array.

Create ( Primitive maxSize ) : Primitive

Create a new array (can be used for numbers or character strings).

CreateFromIndices ( Primitive sbArray ) : Primitive

Create a new array from the indices of a Small Basic array.

CreateFromValues ( Primitive sbArray ) : Primitive

Create a new array from the values of a Small Basic array.

Delete ( Primitive array ) : Primitive

Delete an existing array (not generally required, but can save memory if lots of arrays are created).

GetIndex ( Primitive sbArray, Primitive value ) : Primitive

Get the index of the first occurance of a value in an SB array.

GetValue ( Primitive array, Primitive index ) : Primitive

Get value in array.

Load ( Primitive array, Primitive fileName ) : Primitive

Load an array from a file.

Save ( Primitive array, Primitive fileName ) : Primitive

Save an array to a file.

Search ( Primitive array, Primitive searchstring, Primitive match ) : Primitive

Obtain an array of the indices that have values that contain searchstring. The search is case in-sensitive. The input array is unchanged and the match array must be previously created with the same size as the array to check.

SetValue ( Primitive array, Primitive index, Primitive value ) : Primitive

Set value in array.

Sort ( Primitive array ) : Primitive

Perform a sort on an LDArray. By default the sort is by string value, therefore 10 comes before 2. To sort by number value, all values must be a number (or empty). Empty values are placed at the end of the sort. The input array is replaced by the sorted array.

SortIndex ( Primitive array, Primitive index ) : Primitive

Obtain an array of the indices in sort order of an array. By default the sort is by string value, therefore 10 comes before 2. To sort by number value, all values must be a number (or empty). Empty values are placed at the end of the sort. The input array is unchanged and the index array must be previously created with the same size as the array to sort.

getArray ( string name ) : Array

비공개 메소드들

메소드 설명
getNewNumber ( ) : int

메소드 상세

Copy() 공개 정적인 메소드

Copy one array to another array. The dimensions of the 2 arrays must be the same.
public static Copy ( Primitive array1, Primitive array2 ) : Primitive
array1 Primitive /// The array to copy from. ///
array2 Primitive /// The array to copy to. ///
리턴 Primitive

CopyNew() 공개 정적인 메소드

Copy one array to a new array.
public static CopyNew ( Primitive array ) : Primitive
array Primitive /// The array to copy. ///
리턴 Primitive

CopyToSBArray() 공개 정적인 메소드

Copy LDArray type to SmallBasic array type. The reverse operation (SmallBasic to LDArray) isn't possible becuase the SmallBasic indexes are not necessarily contiguous integers. Note also that a SmallBasic array cannot hold an empty string value, so these will not be copied.
public static CopyToSBArray ( Primitive array ) : Primitive
array Primitive /// The array name. ///
리턴 Primitive

Count() 공개 정적인 메소드

Get the number of non-empty "" elements in the array.
public static Count ( Primitive array ) : Primitive
array Primitive The array name.
리턴 Primitive

Create() 공개 정적인 메소드

Create a new array (can be used for numbers or character strings).
public static Create ( Primitive maxSize ) : Primitive
maxSize Primitive /// The maximum number of elements in the array. ///
리턴 Primitive

CreateFromIndices() 공개 정적인 메소드

Create a new array from the indices of a Small Basic array.
public static CreateFromIndices ( Primitive sbArray ) : Primitive
sbArray Primitive The SB array.
리턴 Primitive

CreateFromValues() 공개 정적인 메소드

Create a new array from the values of a Small Basic array.
public static CreateFromValues ( Primitive sbArray ) : Primitive
sbArray Primitive The SB array.
리턴 Primitive

Delete() 공개 정적인 메소드

Delete an existing array (not generally required, but can save memory if lots of arrays are created).
public static Delete ( Primitive array ) : Primitive
array Primitive /// The array name. ///
리턴 Primitive

GetIndex() 공개 정적인 메소드

Get the index of the first occurance of a value in an SB array.
public static GetIndex ( Primitive sbArray, Primitive value ) : Primitive
sbArray Primitive The SB array.
value Primitive The value to find.
리턴 Primitive

GetValue() 공개 정적인 메소드

Get value in array.
public static GetValue ( Primitive array, Primitive index ) : Primitive
array Primitive /// The array name. ///
index Primitive /// The index at which to get the value (indexed starting from 1). ///
리턴 Primitive

Load() 공개 정적인 메소드

Load an array from a file.
public static Load ( Primitive array, Primitive fileName ) : Primitive
array Primitive The array to load the data into. /// The array must already exist.
fileName Primitive The file path to load the array from.
리턴 Primitive

Save() 공개 정적인 메소드

Save an array to a file.
public static Save ( Primitive array, Primitive fileName ) : Primitive
array Primitive The array to save.
fileName Primitive The file path to save the file to.
리턴 Primitive

Search() 공개 정적인 메소드

Obtain an array of the indices that have values that contain searchstring. The search is case in-sensitive. The input array is unchanged and the match array must be previously created with the same size as the array to check.
public static Search ( Primitive array, Primitive searchstring, Primitive match ) : Primitive
array Primitive The array to check for matches.
searchstring Primitive The string to search for.
match Primitive An array to hold the index of matched values.
리턴 Primitive

SetValue() 공개 정적인 메소드

Set value in array.
public static SetValue ( Primitive array, Primitive index, Primitive value ) : Primitive
array Primitive /// The array name. ///
index Primitive /// The index at which to add the value (indexed starting from 1). ///
value Primitive /// The value. ///
리턴 Primitive

Sort() 공개 정적인 메소드

Perform a sort on an LDArray. By default the sort is by string value, therefore 10 comes before 2. To sort by number value, all values must be a number (or empty). Empty values are placed at the end of the sort. The input array is replaced by the sorted array.
public static Sort ( Primitive array ) : Primitive
array Primitive The array to sort.
리턴 Primitive

SortIndex() 공개 정적인 메소드

Obtain an array of the indices in sort order of an array. By default the sort is by string value, therefore 10 comes before 2. To sort by number value, all values must be a number (or empty). Empty values are placed at the end of the sort. The input array is unchanged and the index array must be previously created with the same size as the array to sort.
public static SortIndex ( Primitive array, Primitive index ) : Primitive
array Primitive The array to obtain an index order sort.
index Primitive An array to hold the index order of the sorted array.
리턴 Primitive

getArray() 공개 정적인 메소드

public static getArray ( string name ) : Array
name string
리턴 Array