View Poll Results: Which is better when initialising classes. Overloaded function or Overloaded Sub New
- Voters
- 1. You may not vote on this poll
-
overloaded sub new
-
overloaded function
-
Nov 2nd, 2004, 04:53 AM
#1
Thread Starter
Fanatic Member
sub new or functions to initialise a class * RESOLVED but vote if you wish*
I am in the process of designing a class.
I can either write an overloaded function to initialise a class or I can overload sub new.
The advantage of the function is I can return a value indicating whether the initilaisation was successful.
The disadvantage is the function will have to be called every time a new instance of the class is created. With sub new the initialisation parameters are in the dimentialisation (dim) statement.
What do you reckon
Last edited by davidrobin; Nov 2nd, 2004 at 06:35 AM.
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
|