O'Reilly logo

Microsoft® Visual Basic® 2010 Developer’s Handbook by Klaus Löffelmann and Sarika Calla Purohit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating XML Documents with LINQ

You can also create XML documents by using LINQ. For example, suppose that you have a list that was created by using the following code lines:

 Dim vehiclelist As New List(Of Vehicle) vehiclelist.Add(New Vehicle With {.LicensePlate = "MS-VB 2010", .Manufacturer = "Mack", _ .Load = New Vehicle.LoadDescription With {.Amount = 10000, .goods = "Salt"}}) vehiclelist.Add(New Vehicle With {.LicensePlate = "MS-C# 2010", . Manufacturer = "Mercedes-Benz", .Load = New Vehicle.LoadDescription With {.Amount = 20000, .Goods = "Peanuts"}}) vehiclelist.Add(New Vehicle With {.LicensePlate = "MS-F# 2010", .Manufacturer = "Peterbilt", .Load = New Vehicle.LoadDescription With {.Amount = 5000, .Goods = "Bobbleheads"}}) Private Class ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required