Class Car
Public PetName As String
Public ID As Integer
End Class
Module Program
Sub Main()
Dim inventory As XElement = _
New XElement("Inventory", _
New XElement("Car", New XAttribute("ID", "1"), _
New XElement("Color", "Green"), _
New XElement("Make", "BMW"), _
New XElement("PetName", "Stan") _
) _
)
Console.WriteLine(inventory)
End Sub
End Module
|