dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DotGNU]Serialization Compatability and workaround question


From: neilcawse
Subject: [DotGNU]Serialization Compatability and workaround question
Date: Thu, 27 Feb 2003 23:14:50 -0500

Ive got a question for all you gurus..

I am writing some stuff as a replacement for MS System.Windows.Forms.

If you put a picturebox on a form, the image object is serialized into the resources of the form. When the form loads, the ResourceManager deserializes the image (could be an image per locale).

private void InitializeComponent() {

System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form3));

this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));

}

 

If I create a replacement for the Image object – how can I make sure that it will correctly deserialize from a form that was created using .NET?

ie How do I deserialize to my image object from the ms image object.

Without digging into the classes, does my Image object need to have the exact same members both private and public? Is it just variables I need to worry about (because that’s all that will get serialized)? Must the order or the names be the same?

I will certainly be doing a different implementation to Microsofts – with additional variables – If I mark these not to be serialized?

 

Am I missing some neat way of dealing with this?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]