| Public Class clsCommon Inherits System.Collections.DictionaryBase Public Sub AddField(ByVal FieldName As String, ByVal value As Object) Dictionary.Add(FieldName, value) End Sub Default Public Property Item(ByVal key As String) As Object Get Return Dictionary.Item(key) End Get Set(ByVal value As Object) Dictionary.Item(key) = value End Set End Property End Class |
| Public Class clscolCommon Inherits System.Collections.CollectionBase Public Function GenerateAson() As clsCommon End Function Public Sub AddSon(ByVal objSon As clsCommon) End Sub Public Sub Sort() End Sub '默认Item属性以及更多Method从略 End Class |
| With xmlGetList(NodeName, strPath) For i As Integer = 0 To .Count - 1 Dim st As Object = objFather.GenerateAson With DirectCast(.Item(i), XmlElement) For Each ch As XmlNode In .ChildNodes St.AddField(ch.Name,ch.InnerText) Next End With objFather.AddSon(st) Next End With |