Serualizable class in C#

Oct 9 2015 1:24 PM
Hi all!
I am new to this forum and this is my first post. I am currently taking a diploma course in Visual C# Programming. So far so good! But I got stuck on one of the assignments. This is the assignment:
"In memory this information should be managed by objects of class
logon. The items listed in the table above should be represented as attributes of the class. This class should be serializable, and should be stored in the file as logon objects. All logon attempts whether they are successful or not should be recorded in the log file. The log file should be name loginfo.dat. All records should be appended to the end of the file. The file should keep records for a maximum of 10 days. Records older than 10 days old should be regarded as obsolete and should be deleted automatically.
Use LINQ to indentify all records greater than 10 days old."
I have tried many different ways of achieving this, but failed miserably. I tried to follow different online tutorials as well as the course notes but nothing seems to be working for me.
This is the code that I have so far: http://pastebin.com/WezNtUaw
Any advice is greatly welcomed!
Thanks!

Answers (1)