I was wondering if there was an object/function that works like XmlSerializer does - but that does not require the Serializable Attribute to be set.
Here's why: I have a third party object that I would like to extract the information in the public properties (including any collections).
And - of course - the following routine returns an error of:
There was an error reflecting type 'ThridPartyObject'
because the object was not compiled with the [Serializable] attribute.
Public Sub SerialMe(ThridPartyObject as Object)
Dim objStreamWriter As New StreamWriter("C:\Object.xml")
Dim x As New XmlSerializer(ThridPartyObject.GetType)
x.Serialize(objStreamWriter, ThridPartyObject)
objStreamWriter.Close()
End Sub
Perhaps something that would iterate through all the public properties of the 3rd party object? (And the public properties of those properties - and so on)
Any ideas?