|
-
Apr 14th, 2004, 07:44 AM
#1
Thread Starter
Frenzied Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|