Basically, this is ok. About the details:
If you want the enumeration to stop as soon a match is found, then you should write your own enumerator for the tree view:
public static IEnumerable<TreeNode> Descendants(this TreeNodeCollection c)
{
foreach (var node in c.OfType<TreeNode>())
{
yield return node;
foreach (var child in node.Nodes.Descendants())
{
yield return child;
}
}
}
and have
IEnumerable<TreeNode> nodes = this.myTree.Nodes.Desscendants();
I noticed that your code only searches for the root level. The code I provided searches every nodes, including descendants. If you do not want this, please remove the nested foreach loop.
Also, ensure you are using .FirstOrDefault instead of .First. Then you will have a null value instead of an exception if there is no match.
The simplest way IMHO is:
TreeNode currentNode = nodes.FirstOrDefault(n => (n.Tag as MyObject).Index == eqId.Index);