// System.Collections.Queue
//
// Author:
-// Ricardo Fernández Pascual
+// Ricardo Fernández Pascual
//
-// (C) 2001 Ricardo Fernández Pascual
+// (C) 2001 Ricardo Fernández Pascual
//
//
using System;
using System.Collections;
+using System.Runtime.InteropServices;
namespace System.Collections {
+#if NET_2_0
+ [ComVisible(true)]
+#endif
[Serializable]
public class Queue : ICollection, IEnumerable, ICloneable {
if (col == null)
throw new ArgumentNullException ("col");
- _size = _array.Length;
- _tail = _size;
- col.CopyTo (_array, 0);
+ // We have to do this because msft seems to call the
+ // enumerator rather than CopyTo. This affects classes
+ // like bitarray.
+ foreach (object o in col)
+ Enqueue (o);
}
public Queue (int initialCapacity, float growFactor) {