EveryType
Description
The EveryType() method determines whether all entries in the array are the same as the SearchElement, returning True or False as appropriate.
Syntax
expression.EveryType(SearchElement, [FromIndex])
Parameters
- Name
SearchTypeName- Type
String- Necessity
- Required
- Description
- The type name to search for.
- Name
FromIndex- Type
Long- Necessity
- Optional
- Description
- The position in this array at which to begin searching for
SearchElement; the first character to be searched is found atFromIndexfor positive values ofFromIndex, or at the array’sLengthproperty +FromIndexfor negative values ofFromIndex(using the absolute value ofFromIndexas the number of characters from the end of the array at which to start the search). Defaults to the array’sLowerBoundproperty.
Returns
- Type
Boolean- Description
Trueif the array includesSearchElement,Falseif not.
Example
Public Sub EveryTypeExample()
Dim MyArray As BetterArray
Dim result As Boolean
Set MyArray = New BetterArray
MyArray.Push "Foo", "Foo", "Foo", "Foo"
result = MyArray.EveryType("String")
' expected output:
' result is True
End Sub