Quote Originally Posted by SearchingDataOnly View Post
In the following code, if you add a string to an ArrayList of type vbLong, the system will report an error.
Code:
Dim AL As cArrayList
Set AL = New_c.ArrayList(vbLong)

AL.Add 100
AL.Add "Hello"
Code:
Dim AL As cArrayList
Set AL = New_c.ArrayList(vbLong, "Hello")
That is, error handling is controlled internally by the person writing the ArrayList class, not by the compiler.
Ahh, that makes sense. I still prefer the compiler support for generics but I can see the potential use for the example you gave, it is a definite step in the right direction compared to VB6's existing collection objects.