AlexCode Posted November 23, 2003 Posted November 23, 2003 Hi guys... again I'm trying to get some help from you guys about this matter... I need to serialize some properties of a group of controls (Textbox, label, button). The process of serialize it's donne now I need to know how to des-serialize...I'm having some troubles on knowing witch object is witch within the XML file... On my research on the web I've found some references to a 'Formatter' but I really didn't get it... Does anyone knows anything about this ? Thanks, Alex :D Quote Software bugs are impossible to detect by anybody except the end user.
*Experts* Volte Posted November 24, 2003 *Experts* Posted November 24, 2003 It's the same as Serializing, only call the 'Deserialize' method of the XmlSerializer object, instead of the 'Serialize' method. Quote
AlexCode Posted November 24, 2003 Author Posted November 24, 2003 Ok... that I can do... But that only works for objects that can be serialized. If you try to serialize a textbox it won't... you have to do it by hand, and serialize the properties you want. When you want to deserialize the objects on the XML file, that objects don't have to be the same, they can be Textboxes, labels and buttons for example... What we have to do is use a For Each loop, running over each object, ASK WHAT TYPE IT IS, cast it into an object and then you have, for example, a button with the properties that were serialized. That part of "ASK WHAT IT IS" it's what I'm missing... When using the GetType it doesn't know witch type is that. I think I have to use a 'Formatter' class but I don't evern know what it is... :confused: Got my problem? Thank you very much... Ales :D Quote Software bugs are impossible to detect by anybody except the end user.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.