Mega Code Archive

 
Categories / VB.Net / XML LINQ
 

Remove the 4th Employee element

Imports System Imports System.Xml.Linq     Public Class MainClass         Public Shared Sub Main()             Dim employees As XElement = XElement.Load("Employees.xml")             employees.<Employee>.ElementAt(3).Remove()         End Sub     End Class