Imports System
Imports System.Xml
Imports System.Xml.Serialization
Public Class MainClass
Shared Sub Main( )
Dim serialize As XmlSerializer = _
New XmlSerializer(GetType(Order))
Dim MyMovieOrder As Order = _
New Order("Name", 101, 10)
serialize.Serialize(Console.Out, MyMovieOrder)
Console.Out.WriteLine()
End Sub
End Class
Public Class Order
Public name As String
Public id As Integer
Public quantity As Integer
Public Sub New()
End Sub
Public Sub New(ByVal name As String, _
ByVal id As Integer, _
ByVal quantity As Integer)
Me.name = name
Me.id = id
Me.quantity = quantity
End Sub
End Class
|