Castle.MicroKernel.SubSystems.Naming.BinaryTreeComponentName.FindSuccessor C# (CSharp) Method

FindSuccessor() private method

Method finds the next biggest node It assumes Add puts lesser nodes on the right
private FindSuccessor ( TreeNode node ) : TreeNode
node TreeNode
return TreeNode
		private TreeNode FindSuccessor(TreeNode node)
		{
			TreeNode current = node.Left;
			if (current != null)
			{
				while (current.Right != null)
				{
					current = current.Right;
				}
			}

			return current;
		}