Imports System.Xml.Serialization, System.IO
Public Class Tester
Public Shared Sub Main
Dim theSerializer As New XmlSerializer(GetType(employee))
Dim SGamgee As New employee("A", "G", "C")
Dim sw As New StreamWriter("data.xml")
theSerializer.Serialize(sw, SGamgee)
End Sub
End Class
Public Class employee
Public first_name As String
Public last_name As String
Public title As String
Public Sub New()
End Sub
Public Sub New(ByVal first_name As String,ByVal last_name As String,ByVal title As String)
Me.first_name = first_name
Me.last_name = last_name
Me.title = title
End Sub
End Class
|