Пример #1
0
        protected ContainsNode nextBrother()
        {
            bool callerReached = false;

            if (this.parent != null)
            {
                foreach (ContainsNode child in this.parent.childrens)
                {
                    if (callerReached)
                    {
                        return(child);
                    }
                    if (child == this)
                    {
                        callerReached = true;
                    }
                }
            }
            return(parent == null ? null : parent.nextBrother());
        }