Imports System
Imports System.Xml.Linq
Public Class Employee
Public EmployeeID As Integer
Public FirstName As String
Public LastName As String
Public Title As String
Public HireDate As DateTime
Public HourlyWage As Double
End Class
Public Class MainClass
Public Shared Sub Main()
Dim employeeList = New Employee() _
{New Employee With {.EmployeeID = 1, _
.FirstName = "A", _
.LastName = "M", _
.Title = "Tester", _
.HireDate = DateTime.Now, _
.HourlyWage = 10.0}, _
New Employee With {.EmployeeID = 2, _
.FirstName = "B", _
.LastName = "C", _
.Title = "Tester", _
.HireDate = DateTime.Now, _
.HourlyWage = 10.75}}
Dim employees =
<%= From emp In employeeList _
Select _
>
<%= emp.FirstName & " " & emp.LastName %>
<%= emp.Title %>
<%= emp.HireDate.ToString("MM/dd/yyyy") %>
<%= emp.HourlyWage %>
_
%>
employees.Save("Employees.xml")
Console.WriteLine(employees.ToString())
End Sub
End Class