Click here to Skip to main content
15,891,906 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I write a program in C#.
I added a listbox to my form and I have a arraylist.
I want to know when I add information to listbox and array list where the information save?
Posted

1 solution

In memory, just like everything else.
I would recommend though, that you use a List<T> rather than an ArrayList - it is type safe, and you don't need to cast the elements every time you want to use them.
 
Share this answer
 
Comments
_Starbug_ 28-Aug-11 7:43am    
thank you but when I close my program in this case I lose my information?
OriginalGriff 28-Aug-11 7:48am    
Yes.
Unless you specifically save it, everything will be lost when you program closes.
What to do want to save, and how?
_Starbug_ 28-Aug-11 8:23am    
I have no Precedure to save information.Iwant to enter information of some students and can save it's with access database or file or sql server.I need your help
OriginalGriff 28-Aug-11 8:27am    
I would use a database, myself - it's pretty simple, and the procedure is much the same whichever you chose.
There is a run-through here: http://www.codeproject.com/KB/database/sql_in_csharp.aspx
It's a bit old, but it is all still relevant and effective.
_Starbug_ 28-Aug-11 8:42am    
thank you my friend

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