How save item in listbox?

sddd1

Member
Joined
Jul 22, 2021
Messages
14
Programming Experience
1-3
I want to save the item in listbox in c#
Could you share the code ?
Thanks in Advance
sfd.JPG
 
You need to provide a more detailed explanation of the problem. Are you saying that you want to save the items that are currently in the ListBox to some external location so that you can load them again the next time you run the app? If so then there is not just one answer. It depends what that external location is, e.g. a database or some type of file, and what the items are.

Basically, though, you should treat it as two separate operations. The biggest problem that beginners have is that they treat a compound operation as a single unit. In this case, saving this data to your external location will be the same as saving any data to the same type of location, e.g. if you use a database then it will be like any other database save. That means that you need to decide where you want to save to and then learn how to save to that location. That will have absolutely nothing to do with a ListBox. Likewise, learn how to get data out of a ListBox, which has absolutely nothing to do with saving the data. You should only need to come to us with a question about one or the other. If you can't do either then that's two separate questions. Personally, I'd worry about the saving part first. Once you know how to do that, you may have some insight as to what form the data needs to be in to be saved after getting it out of the ListBox.
 
Back
Top Bottom