Oppinions of serialization
-
I am just beginning serialization on .NET, having dealt with it many times before with other systems. I have been told serialization using the XML serializer is simple, and the documentation makes it appear so. But, do I have to make all my properties public? I create accessors for all properties, as its easier to debug things that way, and some of my properties are read-only. I can't go making my internal member variables public, that would be crazy, so what do you do about it? (By the way, if you don't think it is crazy to make your member variables public, then how would you do range checking and protect yourself against corrupted data on de-serialization?) I'm about to start writing my own serialization code for each class, so a quick guide would be really appreciated. I don't care if its XML or binary format, I guess there's really not much difference from a coding point of view anyway. Many thanks, and a Happy New Year to all. Nursey