Skip to content

ITreeNode

Kal Ahmed edited this page Sep 26, 2016 · 2 revisions

Home > Trees > ITree > ITreeNode

ITreeNode

ITreeNode is the interface used to represent the nodes of an ITree instance. A ITreeNode provides properties for storing a key and value at the node and obtaining information about it's children.

API

Again we assume a ITreeNode<String, int> for simplicity in our examples:

//Get the Key
String key = node.Key;

//Get the Value
int value = node.Value;

//Does the node have children?
bool hasChildren = node.HasChildren;

//How many children does the node have
int childCount = node.ChildCount;

Clone this wiki locally