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