Collection of classes

  • Thread starter Thread starter Nikolay Petrov
  • Start date Start date
N

Nikolay Petrov

When create an array of type some class I can access the class method this
way:

Dim AccClass(1234) as SampleClass
arrClass(i).ClassMethod

Is the same possible with ArrayList or other type of Collection?

Thanks in advance
 
well, you can do this

CType(myList(i), SampleClass).ClassMethod

or at least define:

Function SampleClassItem(index as integer) as SampleClass
return CType(myList(index), SampleClass)
End Function

and then you can use:

SampleClassItem(i).ClassMethod

Best Regards,
Alejandro Lapeyre


"Nikolay Petrov" <[email protected]> escribió en el mensaje
When create an array of type some class I can access the class method this
way:

Dim AccClass(1234) as SampleClass
arrClass(i).ClassMethod

Is the same possible with ArrayList or other type of Collection?

Thanks in advance
 
Back
Top