Ejemplo n.º 1
0
        /// <summary>
        /// Remove a thought from the head
        /// </summary>
        /// <param name="thought"></param>
        public void Remove(Thought thought)
        {
            if(_head == thought) {
                _head = _head.Next;
            } else {
                Thought pos = _head;
                while(pos != null && pos.Next != thought) {
                    pos = pos.Next;
                }

                if(pos != null && pos.Next == thought) {
                    thought.Unlink(pos);
                }
            }
        }