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 atFromIndex
for positive values ofFromIndex
, or at the array’sLength
property +FromIndex
for negative values ofFromIndex
(using the absolute value ofFromIndex
as the number of characters from the end of the array at which to start the search). Defaults to the array’sLowerBound
property.
Returns
- Type
Boolean
- Description
True
if the array includesSearchElement
,False
if 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