John Wood

John Wood

  • NA
  • 39
  • 0

Ilist class definition

May 28 2009 9:52 AM

I am working on a project and need to implement the IList interface, or Ilist(of).  Problem is that i havent found any information in respect to how to count a class object from within the object.  I understand using the class private variable to be incremented but if someone declares a variable an array on the variable side instead of the class side how will i do the count then.

for example:

dim xyz(?) as arrClass --variable side array declaration

dim xyz as arrClass(?) --class side array declaration

If i utilize the class side declaration i can have the user input the size as a parameter and go about my way.  But if they use the variable side declaration, like i do almost all the time, how do i obtain that array size declaration.  To make matters worse, there could be a situation where someone might do a multidimensional or (god forbid) jagged array, how would i catch those dimensions if they do either declaration format?