I am planning to make an address book in C# win forms , so I wanted to know that how can I read and write objects ?cause i will be making a separate class file for the data (name,address,phoneNo) so can anyone help me out?
Reading / Writing Objects
Started by ahmed, Oct 08 2009 03:25 AM
1 reply to this topic
#1
Posted 08 October 2009 - 03:25 AM
|
|
|
#2
Posted 08 October 2009 - 05:01 AM
If I were you what I could do is create a class called Information or Contact and then have another class that is a collection of these contacts. The Contact class can have properties like first name, middle name, last name, phone numbers, e-mail, etc. When the user inputs this information it is then saved in the form and the contact is saved into the "AddressBook" or "ContactCollection." You need to allow the user to save these contacts so you may want to make the class serializeable and save an XML document that has all of the contact information. This is the way I would implement it.
As for reading information, just get the values from the form when the user inputs them and clicks a save button. If you need any more help let me know.
As for reading information, just get the values from the form when the user inputs them and clicks a save button. If you need any more help let me know.
-CDG10620
Software Developer
Software Developer


Sign In
Create Account


Back to top









