Serialization Gremlin
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
Hey Guys Try this:
Public Class TestClass
Public A As Integer = 100 Public ASpecified As Boolean
End Class
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ser As New System.Xml.Serialization.XmlSerializer(GetType(TestClass)) Dim ms As New IO.MemoryStream ser.Serialize(ms, New TestClass) MsgBox(System.Text.ASCIIEncoding.UTF8.GetString(ms.ToArray))
End Sub
Then try changing
ASpecified
toInteger
. There seems be a problem with serializable methods/fields that end with the word Specified, can anyone else confirm that I'm not going round the bend... it's been an afternoon of pulling what little hair I have out tracking it down! Cheers Tom