Results 1 to 40 of 53

Thread: when do you use NEW?

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    when do you use NEW?

    I've been doing this for some time now but I still consider myself a 'newbie' lol

    ok, just when I thought I had the OOP thing down, I am lost again!!

    when you create a new variable/instance of a class, when do you know to use the NEW keyword? for example:

    VB Code:
    1. dim button as NEW button
    VB Code:
    1. dim button as button
    VB Code:
    1. dim dg as datagrid
    VB Code:
    1. dim dg as NEW datagrid

    And, when you place a component/control from the toolbox onto the form, is the IDE secretly doing those declarations for you behind the scenes?

    Then, there are times when you go ahead and put the '=' at the end and set them to something...When do you know the appropriate syntax?

    I've apparently forgotten some basics along the way can anyone enlighten me?

    ashamed---->
    Last edited by Andy; Apr 28th, 2004 at 07:59 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
  •  



Click Here to Expand Forum to Full Width