Display the employee names and their hourly rate
Imports System
Imports System.Xml.Linq
Public Class MainClass
Public Shared Sub Main()
Dim employees As XElement = XElement.Load("Employees.xml")
Dim beforeQuery = From ele In employees.<Employee> Select Name = ele.<Name>.Value, Wage = CDbl(ele.<HourlyRate>.Value)
For Each ele In beforeQuery
Console.WriteLine("{0} gets paid ${1} an hour.", ele.Name, ele.Wage.ToString())
Next
End Sub
End Class
Related examples in the same category