VB 2010 (47)XNamespace对象

XNamespace 类

https://docs.microsoft.com/zh-cn/dotnet/api/system.xml.linq.xnamespace?view=netframework-4.8

表示 XML 命名空间。 无法继承此类。

Dim root As New XElement("Company", _
                                           New XAttribute("Type", "Publisher"), _
                                           New XElement("CompanyName", "Wrox"), _
                                           New XElement("CompanyAddress", _
                                                        New XElement("Street", "111 River Street"), _
                                                        New XElement("city", "Hoboken"), _
                                                        New XElement("State", "NJ"), _
                                                        New XElement("Counttr", "USA"), _
                                                        New XElement("Zip", "07030-5774")))
        Console.WriteLine(root.ToString)
        Console.WriteLine("Prss ENTER to exit")
        Console.Read()

发布了146 篇原创文章 · 获赞 0 · 访问量 2742

猜你喜欢

转载自blog.csdn.net/ngbshzhn/article/details/105575057
VB