I'm trying to serialize a user's preferences by means of an XMLSerializer. The preferences class contains Strings, Integers, Booleans and several Color structure variables. The serialization doesn't throw any errors, however the generated xml file has empty values only for the color variables.

I tried the following two declarations of the XMLSerializer object, neither workerd.

Code:
            Dim xml As New Xml.Serialization.XmlSerializer(GetType(UsrPreferences), New System.Type() {GetType(Color)})
            Dim xml As New Xml.Serialization.XmlSerializer(GetType(UsrPreferences), New Xml.Serialization.XmlRootAttribute("UsrPreferences"))
How can I fix this?