Exemple #1
0
 public override T[] ToArray()
 {
     lock (root)
     {
         return(deque.ToArray());
     }
 }
Exemple #2
0
        private static void TestToArray(Deque <int> deque)
        {
            deque.Clear();

            PopulateDequePushBack(deque);

            int[] array = deque.ToArray();
            int   i     = 0;

            foreach (int item in deque)
            {
                Debug.Assert(item.Equals(array[i]));
                i++;
            }
        }
Exemple #3
0
        private static void TestToArray(Deque deque)
        {
            deque.Clear();

            PopulateDequePushBack(deque);

            object[] array = deque.ToArray();
            int      i     = 0;

            foreach (object obj in deque)
            {
                Debug.Assert(obj.Equals(array[i]));
                i++;
            }
        }