Thank you very much. You are a life save
Hi Joseph,
Thank you verymuch for correcting my mistake. I was under the wrong impression that serialization is meant for classes. Not the objects. Thank you once again for correcting me.
Thanks
Rakesh
User Profile
Collapse
-
Hi Joseph,
Thanks for getting back to me. Your answer gave me confidence that I learnt the right stuff. Yeah I tried the example as you said,it was showing 0. As we discussed, during the serialization, temp variable is not serialized, and how did it appear after deserializing?
This is what I did
Code:Store readStore; FileStream flStreamRead = new FileStream("MyStore.dat", FileMode.OpenOrCreate, FileAccess.Read);
Leave a comment:
-
Why Do we need Serialization?
Hi there, just digging into serialization a few questions about serialization.
1. Why do we need serialization?
Ans: For transferring the objects or saving the objects in database or file etc.
But why to serialize inorder to transfer the file? We can directly transfer the file if we create the class in separate .cs file and directly send the file to the person required.
2. Where do we implement serialization?
...Last edited by Niheel; Aug 24 '10, 06:25 PM. -
Regarding Serialization in .net
Hi there,
I am just a learner in .net . I am presently learning serialization in .net by my own.Just a quick question.
When we serialize any class using serializable attribute, the whole class gets serialized right?
Consider this code
Code:[Serializable] public class Store { private int sCount; public int stockCount { get { return sCount;
No activity results to display
Show More
Leave a comment: