You have to create the file using serialization. This all can you code it? Using C# IDE,
Fantastic news! We've Found the answer you've been seeking!
Question:
You have to create the file using serialization.
This all can you code it?
- Using C# IDE, make a class called Event that has two properties:
- event number
- location
- Make a object from the class and assign a value of 1 to the event number property and a value of Calgary to the location property.
- Use serialization to serialize the object to a file called event.txt.
- Use deserialization to deserialize the object from the file and display the values on the Console.
- Make a method called ReadFromFile, where you write the word "Hackathon" to the file, and then read the first, middle and last characters using StreamWriter and the Seek method.
Expected Output
1
Calgary
Tech Competition
In Word: Hackathon
The First Character is: "H"
The Middle Character is: "a"
The Last Character is: "n"
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: