Role: Collection of CATBSTR type of strings.
Properties
- Property Count() As (Read Only)
-
Returns the number of character strings in the list.
- Example:
-
This example retrieves in NumberOfStrings the number of character strings
currently gathered in MyList.
Dim NumberOfStrings As long NumberOfStrings = MyList.Count
Methods
- Sub Append( iBSTR)
-
Adds a character string to the end of the list.
- Parameters:
-
- iBSTR
- The character string to be added to the list. dd>
- Example:
-
The following example appends a string to the list.
Dim MyList As PspListOfBSTRs MyList.Append("MyString")
- Func Item( iIndex) As
-
Returns a character string from its index in the list.
- Parameters:
-
- iIndex
- The index of the first character string in the collection is 1, and the index of the last character string is Count. dd>
- Returns:
- the retrieved string. dd>
- Example:
-
The following example returns the third character string in the list.
Dim MyStr As String Dim MyList As PspListOfBSTRs MyStr = PspListOfBSTRs.Item(3)
- Sub RemoveByIndex( iIndex)
-
Remove a character string from the list by specifying its position in the list.
- Parameters:
-
- iIndex
- The position of the character string to be removed in the list. dd>
- Example:
-
The following example removes the second entry in the list. Please note that the list index starts with 1.
Dim MyList As PspListOfBSTRs MyList.Remove(2)