XML Deserialize one type into another type

A

Adam Benson

Hi,

If MyClass has a property in it of type OldType and in the new versions of
our libs (long story) OldType is not available. Can I instruct the XML
deserializer to deserialize OldType into NewType?

// Serialized like this
public class MyClass
{
...
public OldType
{ get; set };
...
}

// Deserialize into this assuming the rest of MyClass is unchanged?
public class MyClass
{
...
// OldType was here, I want to deserialize OldType into NewType
public NewType
{ get; set };
...
}

Any pointers gratefully received.

Thanks,

Adam.

--

- Adam.

==============================
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top