Hi Chris,
What's missing there is that you're not giving Hole() a value for i. The
compiler's then complaining when it comes to Return _Hole(i) because i hasn't
been declared to it.
Here's the missing bit added:
Public Property Hole (I As Integer) As Integer
As it's looking so far, an ArrayList gives you no advantage because you
know that you'll have exactly 18 values. ArrayLists are very useful when you
don't know how many values you are going to have.
With the array as you've defined it, you know that it will, and can, only
store Integers - it's strongly typed. An ArrayList, on the other hand, takes
Objects which means it'll take anything - it's not strongly typed.
There are differences in how the memory is used too, but we won't go into
that yet. Suffice to say that an Array of Integers is considerably cheaper
than the equivalent ArrayL:ist.
Regards,
Fergus