VB.Net/XML LINQ/XComment

Материал из VB Эксперт
Перейти к: навигация, поиск

Get all Xml comments

<source lang="vbnet"> Imports System Imports System.Reflection Imports System.Xml Module Module1

   Sub Main()
       Dim xml As XElement = XElement.Load("People.xml")
       Dim record As IEnumerable(Of XComment) = xml.Nodes().OfType(Of XComment)()
       For Each comment As XComment In record
           Console.WriteLine(comment)
       Next
   End Sub

End Module


 </source>