M
Monty
Hello,
I have a settings class that looks like this:
Imports System.Xml.Serialization
<Serializable()> _
Public Class MySettings
<XmlAttributeAttribute("ItemCategory")> _
Public Shared ItemCategory As Integer
<XmlAttributeAttribute("DefaultItemCategoryID")> _
Public Shared DefaultItemCategoryID As Integer
Public Shared Sub LoadSettings()
ItemCategory = 1042
DefaultItemCategoryID = 1456
End Sub
End Class
As you probably guessed, when I serialize this object to XML, there are no
attributes or values in the XML, just the header and the object name. The
shared variables DO have values. Why is this and how can I serialize these
values?
TIA,
Monty
I have a settings class that looks like this:
Imports System.Xml.Serialization
<Serializable()> _
Public Class MySettings
<XmlAttributeAttribute("ItemCategory")> _
Public Shared ItemCategory As Integer
<XmlAttributeAttribute("DefaultItemCategoryID")> _
Public Shared DefaultItemCategoryID As Integer
Public Shared Sub LoadSettings()
ItemCategory = 1042
DefaultItemCategoryID = 1456
End Sub
End Class
As you probably guessed, when I serialize this object to XML, there are no
attributes or values in the XML, just the header and the object name. The
shared variables DO have values. Why is this and how can I serialize these
values?
TIA,
Monty