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
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"
Step by Step Solution
There are 3 Steps involved in it
using System using SystemIO using SystemRuntimeSerialization using SystemRuntimeSerializationFormatt... View full answer
Get step-by-step solutions from verified subject matter experts
