예제 #1
0
        public LinkedList(LinkedList l)
        {
            _head = null;
            _tail = null;
            _count = 0;

            Node cursor = l._head;
            while(cursor != null)
            {
                Add(cursor.val);
                cursor = cursor.next;
            }
        }
예제 #2
0
파일: Monitor.cs 프로젝트: bholl/zeroc-ice
 public Monitor()
 {
     _waitQueue = new LinkedList<System.Threading.EventWaitHandle>();
     _mutex = new System.Threading.Mutex();
     _lockCount = 0;
 }
예제 #3
0
            private bool _removed; // True after a call to Remove(), false otherwise.

            #endregion Fields

            #region Constructors

            internal Enumerator(LinkedList list)
            {
                _list = list;
                _current = null;
                _movePrev = null;
                _moveNext = null;
                _removed = false;
            }
예제 #4
0
 public object Clone()
 {
     LinkedList l = new LinkedList();
     Node cursor = _head;
     while(cursor != null)
     {
         l.Add(cursor.val);
         cursor = cursor.next;
     }
     return l;
 }