Imports System.Xml.SerializationI want to serialize/deserialize the "Data" property as a different type.
Imports System.Security.Permissions
<Serializable()> _
Public Class Response
Private msName As String
Private moDataset As System.Data.DataSet
Public Sub New()
End Sub
Public Property Method() As String
Get
Return msName
End Get
Set(ByVal value As String)
msName = value
End Set
End Property
Public Property Data() As System.Data.DataSet
Get
Return moDataset
End Get
Set(ByVal value As System.Data.DataSet)
moDataset = value
End Set
End Property
End Class
How can I do this?
Do I specify an attribute like:
<XmlElement("Dataset", "Data", System.Xml.Schema.XmlSchemaForm.Qualified, True, "aix_ws", 1, Type.GetType("Sometype"))> _
Public Property Data() As System.Data.DataSet
...
If yes, how do you specify the type for the xmlattribute, since it wants a constant and the GetType call doesn't work.
Note: I'm using the standard XMLSerializer. (Not interested in BinaryFormatter fix)