Hi peeps,
this is a continued post from serialization tutorial. walaah. you guys already know how to do serialization.
Ok now, we going to read our created file and store it in filestream and deserialize it back into our data object.
1. Ensure that we are pointing to the right path.
2. Read our file, notice that we are using FileMode.Open
this is a continued post from serialization tutorial. walaah. you guys already know how to do serialization.
Ok now, we going to read our created file and store it in filestream and deserialize it back into our data object.
1. Ensure that we are pointing to the right path.
2. Read our file, notice that we are using FileMode.Open
3. Instantiate our DataObjectSerializable instance. We going to store back the data that we deserialize into it.
4. Deserialize our file stream and assign the returned value to our dataObject.
5. Print out the dataObject data values to check.
Done! Run the program.
The output
Hope this helps.
For full code you can view it from my github repo here:
Comments
Post a Comment