Esempio n. 1
0
        // Find a node in the active list by comparing nodes with sampleNode
        // Lower level DLink class create and pass in the sampleNode
        // Lower level DLink class defines derivedEqual
        public virtual DLink Find(DLink sampleNode)
        {
            DLink current = this.poActiveHead;

            // Iterate through the list
            while (current != null)
            {
                // Call derived Equal function. If match, return the current
                if (sampleNode.DerivedEqual(current))
                {
                    return(current);
                }

                current = current.pNext;
            }

            return(null);
        }