Original Post
The XML serialization/deserialization framework included in .NET will automatically deserialize the text contents of an element into most fundamental types (bool, int, string, etc.), but I'm wondering if there's a way to extend that so that I could turn an element like this:
0, 0, 0
into a custom Vector object, for example. I've read through a lot of the documentation and found how to deserialize complex objects with child elements, but I haven't seen a way to parse the inner text differently as I would need to for the above. The only way I know to do that currently is deserialize it as a string and manually parse it after the fact for each Vector element, or to do this:
0
0
0
I know I need to write the code to split it up and parse the values, I'm just wondering if I can set it up so that it automatically happens if a Vector object is being deserialized.
Anyone know about this? Thanks!
into a custom Vector object, for example. I've read through a lot of the documentation and found how to deserialize complex objects with child elements, but I haven't seen a way to parse the inner text differently as I would need to for the above. The only way I know to do that currently is deserialize it as a string and manually parse it after the fact for each Vector element, or to do this:
I know I need to write the code to split it up and parse the values, I'm just wondering if I can set it up so that it automatically happens if a Vector object is being deserialized.
Anyone know about this? Thanks!