Declaring Global variables in a WebService

Discussion in 'ASP .Net Web Services' started by sendhil, Nov 19, 2003.

  1. sendhil

    sendhil Guest

    hi,
    In the webservice which iam writing, i have to declare a an array
    which has to be global. How and where shuld i declare it.
    I declared it as

    public static bool[] Busy = new bool[50];

    but this doesnt seem to work. This array is reinitialized everytime.


    Thanks
    sendhil
     
    sendhil, Nov 19, 2003
    #1
    1. Advertising

  2. sendhil

    Manni Guest

    To keep things over calls - place it in Application["xxxx"] or use
    the Cache - wich gives you the same functionalty as Application with
    greater control of the lifetime!!

    HTH

    Manfred
    "sendhil" <> schrieb im Newsbeitrag
    news:...
    > hi,
    > In the webservice which iam writing, i have to declare a an array
    > which has to be global. How and where shuld i declare it.
    > I declared it as
    >
    > public static bool[] Busy = new bool[50];
    >
    > but this doesnt seem to work. This array is reinitialized everytime.
    >
    >
    > Thanks
    > sendhil
     
    Manni, Nov 19, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mortal Wombat
    Replies:
    3
    Views:
    6,844
    Mortal Wombat
    Aug 7, 2003
  2. Wayne
    Replies:
    2
    Views:
    485
    Wayne
    Nov 11, 2003
  3. jubelbrus
    Replies:
    5
    Views:
    632
    JohnQ
    Jul 20, 2007
  4. Bubba
    Replies:
    3
    Views:
    476
    George Bina
    Oct 8, 2007
  5. crazygrey
    Replies:
    0
    Views:
    389
    crazygrey
    Aug 25, 2008
Loading...

Share This Page