开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜