Q:

Use TreeNode Class to work with hierarchically structured data without a TreeView

I am somehow stuck and can't see the forest for the trees.
What I want to do:
I have a large list of data (about 6000 nodes), at the moment pretty simple:

Unique ID  
Parent  
List of Children  
List item

Currently, this is flat data but I want to create a hierarchy of it, so i can

search for UniqueID in a specific depth of the tree
for any ID, list row of parents up to the root
list all childrens of a single ID
loop through entries (vertical, horizontal)
order horizontal items
List items

What I tried:
I started with this code:
see link
<Serializable> _
Public Class TreeNode
    Private _uniqueID As Integer
    Private _name As String
    Private _parentID As Integer
    Private _depth As Integer
    Private _children As ArrayList
    Public Sub New()
    End Sub
    Public Sub New(name As String, parentID As Integer)
        Me.New(0, name, parentID, -1)
    End Sub
    Public Sub New(uniqueID As Integer, name As String, parentID As Integer, depth As Integer)
        _uniqueID = uniqueID
        _name = name
        _parentID = parentID
        _depth = depth
    End Sub
    ''' <summary>
    ''' Gets or sets the unique ID associated with this category
    ''' </summary>
    ''' <remarks>Once a non-zero ID has been set, it may not be modified.</remarks>
    Public Property UniqueID() As Integer
        Get
            Return _uniqueID
        End Get
        Set
            If _uniqueID = 0 Then
                _uniqueID = value
            Else
                Throw New Exception("The UniqueID property cannot be modified once it has a non-zero value")
            End If
        End Set
    End Property
    Public ReadOnly Property Depth() As Integer
        Get
            Return _depth
        End Get
    End Property
    ''' <summary>
    ''' Gets or sets the label for this node
    ''' </summary>
    Public Property Name() As String
        Get
            Return _name
        End Get
        Set
            _name = value
        End Set
    End Property
    ''' <summary>
    ''' The ID of the parent node
    ''' </summary>
    Public Property ParentID() As Integer
        Get
            Return _parentID
        End Get
        Set
            _parentID = value
        End Set
    End Property
    ''' <summary>
    ''' Gets the children TreeNode objects for this category
    ''' </summary>
    ''' <remarks>In .NET 2.0, this can be modified to use generics, and have type ArrayList&lt;TreeNode></remarks>
    Public Property Children() As ArrayList
        Get
            Return _children
        End Get
        Set
            _children = value
        End Set
    End Property
End Class

I created my tree:
Public Dendrogram As List(Of TreeNode)

.. and added all nodes to it. Super clean, understandable, but no functions! 
This brought me to another approach But it is far too complex for my purposes.
.. then I was wondering: why not use the TreeNode Class from MS? But I don't want to use the TreeView associated with it. There is this example, but it is in C and I can't seem to apply it in VBNet (got stuck at implementation of the ITreeNode).
My question:
How can I use functionalities of the TreeView such as "treeView1.Nodes.Add(topNode)" or "treeView1.Nodes(0).Nodes.Find(searchterm, True)" without actually having it on my form (I just need it to structure my data, without visualizing it).
I hope this makes sense and anyone can point me in the right direction!

A:

Although TreeNode is in the System.Windows.Forms namespace, there doesn't seem to be anything in it that is really tied to WinForms (it already seems to be inherited in a couple of other namespaces) so, assuming it gives you the functionality you need, can't you just use it?  e.g.
Imports System.Windows.Forms

Sub Main
    Dim root = New TreeNode("Root")
    root.Nodes.Add("Node 1")
    root.Nodes.Add("Node 2")
    root.Nodes.Add("Node 3")
    root.Nodes(0).Nodes.Add("Node 1.1")
    root.Nodes(0).Nodes(0).Nodes.Add("Node 1.1.1")
    root.Nodes(1).Nodes.Add("Node 2.1")
    PrintNode(root, 0)
End Sub

' Define other methods and classes here
Sub PrintNode(node As TreeNode, level As Integer)
    Console.WriteLine("{0}{1}", New String(" ", level * 2), node.Text)
    For Each child In node.Nodes
        PrintNode(child, level + 1)
    Next
End Sub

Output:
Root
  Node 1
    Node 1.1
      Node 1.1.1
  Node 2
    Node 2.1
  Node 3

