Public variable in C# windows application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nmsreddi
    Contributor
    • Jul 2006
    • 366

    Public variable in C# windows application

    hello

    i am developing c# windows application where i got a requirement of using the

    login name through out my application. even i have created a variable as public

    and i am able to access that public variable in other windows form ,but the

    value of the variable i am getting null how to maintain the vaeriable value

    through out my applicvation


    thanks

    nmsreddi
  • crystalite
    New Member
    • Dec 2006
    • 13

    #2
    use Session i supposed??

    cheers!

    Comment

    • ashmc44
      New Member
      • Nov 2006
      • 12

      #3
      sessions or cookies makes it possible

      Comment

      • nmsreddi
        Contributor
        • Jul 2006
        • 366

        #4
        Hello friends

        thanks for your reply


        but where can i get sessions and cookies in WINDOWS APPLICATION

        MY PROBLEM IS IN WINDOWS APPLICATION



        REGARDS

        NMSREDDI

        Comment

        • codesid
          New Member
          • Dec 2006
          • 6

          #5
          Wihtout seeing details of the code, it is kind of hard to say, but it seems you've done it right. My first idea would be to create a dummy application where you will only rewrite this behavior, and see if it works.

          I would not use in this case, but a similar solution to cookies and sessions for windows application is the use of Caching. You will find lots of articles about this on the web.

          Cheers!

          Comment

          • fradique
            New Member
            • Dec 2006
            • 2

            #6
            Start your application from an static class, define your public variables here

            Comment

            Working...