user object with TreeNode in C#
-
10-07-2019 - |
Question
Can i tie a user object to a TreeNode in C#?
Solution
Yes. You can use the Tag property to store any user object for a particular tree node.
http://msdn.microsoft.com/en-us/library/system.windows.forms.treenode.tag.aspx
TreeNode node = CreateATreeNode();
node.Tag = myStateObject;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow