Accessing arrays through properties..
I must be slow today, but Im sitting here trying to figure out how to design this class I, have two classes actually
class Line
class Doc
Doc contains one or more lines I figured the best way to make this is to have the developer do it like this
dim mydoc as new doc
mydoc.lines.add(new line("line1"))
OR should I do it like this:
mydoc.addline(new line("line1"))
which means that I write a public method that is accessing a private property and storing the line-object
Personally I prefer #1
It work perfectly if lines is a public arraylist in class doc, but I want to have it as a property, making the arraylist private...
How can I do this?
/henrik