Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Software bugs are impossible to detect by anybody except the end user.
Posted

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

Software bugs are impossible to detect by anybody except the end user.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...