I am quite new to programming and have been learning as i go. This program is just something i am doing to learn more about what i can do in programming. I am using c# WPF. I have a program that when opens gives you a choice of two buttons, each opens a new window one to add animals to a list and the other to display the objects in the the list. but i can't find a way of saving the objects in the adding window and being able to load them when i restart the program? i have seen some thing about save dialog but i am not sure if this is what i need or?
Asked
Active
Viewed 2,278 times
0
-
There are many options here. One is http://stackoverflow.com/questions/6115721/how-to-save-restore-serializable-object-to-from-file (save to a file), another is http://msdn.microsoft.com/en-us/library/0f92s97z.aspx (save to a SQL database). – Lee O. Feb 20 '14 at 17:57
-
Yea I would say try saving to a text file first. – Ryan Schlueter Feb 20 '14 at 17:58
-
Use Generics to Save like List,Dictionary – Revan Feb 20 '14 at 18:05
1 Answers
1
You need to first decide where to save your results. Database / XML File / Binary file / ??.
It seems like you are practicing C#, try persisting it to a file check this link, has some good example.

Community
- 1
- 1

Orion_Eagle
- 124
- 5
-
this looks like just what i need from what i have read in the link have not seen anything about Serializable when i was looking for answers thank you. – John Mc Gowan Feb 20 '14 at 18:15