Results 1 to 2 of 2

Thread: whats fastest: Properties vs variables *Solved*

  1. #1

    Thread Starter
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    whats fastest: Properties vs variables *Solved*

    I'm making a web control that have some public properties.
    These properties are of course linked to private vars.
    In my control I of course work with these properties.
    My Q is this.

    what is the fastest.
    To read/set the value of the private var
    or
    To read/ set the value using the public property.

    And what are the common practise?
    Last edited by onerrorgoto; Aug 20th, 2003 at 04:30 AM.
    Onerrorgoto

    Dont be to optimistic, the light at the end of the tunnel might be a train

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Well, I'm sure that the fastest method when inside the control would be to use the private variables. But you would probably never notice the difference. However, when getting and setting properties, you may be doing other things that won't happen if you get/set directly with the variable. Just something to keep in mind.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

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