Click here to Skip to main content
15,917,808 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello All,


I wanted to use a global variable in c# in session.How can i use a session variable in c# windows application.Any one can help me out with an exampble.Waiting for your reply.

Regards,
Shameen CP
Posted
Comments
Prerak Patel 28-Mar-11 2:21am    
Is it windows application?
shameen4u 28-Mar-11 3:14am    
yes windows application

1 solution

Windows forms applications do not use the session concept.

You can simply persist the object in memory for the duration of the application.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 28-Mar-11 2:28am    
What a mess in some heads! This is a second time I see such a question. My 5.
--SA
Abhinav S 28-Mar-11 2:34am    
Me too. I actually tried to locate the previous question but could not find it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900