Connecting Tech Pros Worldwide Help | Site Map

How to insert integer array into application variable?

Newbie
 
Join Date: Apr 2009
Posts: 21
#1: Aug 28 '09
Application["Variable name"]=intOne[].
Please give methe code?
PRR PRR is offline
Moderator
 
Join Date: Dec 2007
Location: India
Posts: 700
#2: Sep 9 '09

re: How to insert integer array into application variable?


Try this code

Expand|Select|Wrap|Line Numbers
  1. int[] my = new int[5] { 1,2,3,4,5};
  2.         Application.Lock();
  3.         Application["MY"]=(int[])my;
  4.         Application.UnLock();
  5.  
  6.  
To retrieve
Expand|Select|Wrap|Line Numbers
  1. int[] my1=(int[])Application["MY"];
  2.  
Newbie
 
Join Date: Apr 2009
Posts: 21
#3: Sep 10 '09

re: How to insert integer array into application variable?


Thank you very much.It is correct.
Reply