XDocument to read value from AppSettings section in VB.net

Rajnilari2015
Posted by Rajnilari2015 under VB.NET category on | Points: 40 | Views : 1152
Imports System.Xml.Linq

Namespace Test
Class Program
Private Shared Sub Main(args As String())
XDocument.Load(".\Web.config").Descendants("appSettings").Descendants("add").ToList().Foreach(Function(element) Console.WriteLine("SET {element.FirstAttribute.Value}=""{element.LastAttribute.Value}"""))

Console.ReadKey()
End Sub
End Class
End Namespace

Comments or Responses

Login to post response