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

    1 100.00%
  • overloaded function

    0 0%
Results 1 to 5 of 5

Thread: sub new or functions to initialise a class * RESOLVED but vote if you wish*

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982

    Resolved 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.


    Things I do when I am bored: DotNetable

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width