Results 1 to 5 of 5

Thread: public variable in a class

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    4

    public variable in a class

    HI all,

    I am trying to change the values of my constants. i have declared these constants in a class as publiv cons var1 = 'value'
    how ever i am not able to change this value from with in the program. is there any way i can do this or is there any way i can declare a variable in a class and set the value from with in my program during run time.

    Thanks

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    If you declared a variable as a constant, then it is going to remain.... well constant. You're not supposed to change it.

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    4
    ok.. can anyone give me a sample of how to do this. Meanning, when i get the values from my db I want to store it in avriable that can be accessed from any form or class.
    I am new to this

    thanks

  4. #4
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by tekd
    ok.. can anyone give me a sample of how to do this. Meanning, when i get the values from my db I want to store it in avriable that can be accessed from any form or class.
    I am new to this

    thanks
    Just don't make them a constant

  5. #5
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602
    Why not make it a public shared property?


    kind regards
    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
  •  



Click Here to Expand Forum to Full Width