TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Makinde A. Israel
1.6k
168
20.9k
How to Read and Write a Collection to file
Mar 28 2016 2:30 AM
Good day,
please am writing a program that will keep track of events. Though I don't know how best I should have done it. I started off by writing an MyEvent class with public properties like Name of the event, place, time and Date and I wish to extend the class with more public properties as need be. Then I have a SortedDictionary<DateTime, MyEvent> collection where both past, present and future events are collected. My question is how can I write the content of this dictionary to file when closing this app and read that same content into this dictionary again at start-up?
This application will be a desktop app, and I don't want to go the way of SQL because I don't know it and thirdly I want that file to have custom extension and can only be opened with this app.
Thanks in anticipation for your response.
Reply
Answers (
1
)
Use Private constructor and Collection
How to Read and Write Collections custom types to file with custom file extension