I keep getting the following error:
An unhandled exception of type 'System.InvalidOperationException' occurred in system.xml.dll
Additional information: There was an error reflecting type 'RaptorMain.CurrentState'.
This is how i'm attempting to serialize:
And the class i'm attempting to serialize:Code:cs = New CurrentState fillCurrentState() 'fills the class properties If IO.File.Exists("data.xml") Then IO.File.Delete("data.xml") 'make the file and stream Dim fs As New IO.FileStream("data.xml", IO.FileMode.CreateNew) 'serialize it to xml data Dim xf As New Xml.Serialization.XmlSerializer(GetType(CurrentState)) xf.Serialize(fs, cs) fs.Close()
Code:<Serializable()> Public Class CurrentState #Region "Member Variables" Private Side1ConcentrationValue As Double . . . Private tons_RB_CheckedValue As Boolean = False #End Region #Region "Member Properties" Public Property tons_RB_Checked() As Boolean Get Return tons_RB_CheckedValue End Get Set(ByVal Value As Boolean) tons_RB_CheckedValue = Value End Set . . . End Property #End Region Public Sub New() End Sub End ClassAny Ideas?


Any Ideas?
Reply With Quote