开发者

how to create a hierarchical datastructure just like xml using .net?

开发者 https://www.devze.com 2023-01-07 11:50 出处:网络
i want to crate a hi开发者_运维知识库erarchical data structure same as XML, means parent, child, sub child... like that one using vb.net. so ho can i create that one?You can use the XElement class to

i want to crate a hi开发者_运维知识库erarchical data structure same as XML, means parent, child, sub child... like that one using vb.net. so ho can i create that one?


You can use the XElement class to model an XML tree.


Here is the general pattern for creating parent-child relationships.

Public Class Node

  Private m_Children As List(Of Node) = New List(Of Node)

  Public ReadOnly Property Children() As List(Of Node)
    Get
      Return m_Children
    End Get
  End Property  

End Class
0

精彩评论

暂无评论...
验证码 换一张
取 消