Reputation: 251
I need to compare two tree-structured reports and show comparison results in a datagridview in vb.net. I think using tree structure should be efficient. But note that I DO NOT use a tree view to display results (I found a lot of help in tree view though). All I want to do is to construct two trees, and then search the trees and compare. I do not know how to write this in vb.net.
Upvotes: 0
Views: 921
Reputation: 3701
A tree like this would consist of a class that contains a list of child nodes and one or more methods to search using recursion. A very simple example:
Class MyNode
Public ChildNodes as new Collection(Of MyNode)
Public Data as Object
Public Sub Search(searchString as string) as Collection(Of MyNode)
....
End Sub
End Class
The ChildNodes and Data are typical for Trees, the Search Method (and any number of other Methods) are specific to your task.
Upvotes: 1