Exemplo n.º 1
0
        public IEnumerator <T> GetEnumerator()
        {
            monitorListNode <T> travel = First;

            while (travel != null)
            {
                yield return((T)travel.Value);

                travel = travel.Next;
            }
        }
Exemplo n.º 2
0
        public void addNewNode(T value)
        {
            var newNode = new monitorListNode <T>(value);

            if (First == null)
            {
                First        = newNode;
                newNode.Prev = Last;
                Last         = First;
            }
            else
            {
                Last.Next    = newNode;
                newNode.Prev = Last;
                Last         = newNode;
            }
        }