//
using System;
+using System.Runtime.InteropServices;
namespace System.Collections {
+ [ComVisible(true)]
[Serializable]
- public abstract class CollectionBase : IList, ICollection, IEnumerable {
+#if INSIDE_CORLIB
+ public
+#else
+ internal
+#endif
+ abstract class CollectionBase : IList, ICollection, IEnumerable {
// private instance properties
private ArrayList list;
}
// Protected Instance Constructors
- protected CollectionBase() {
+ protected CollectionBase()
+ {
+ }
+
+ protected CollectionBase (int capacity)
+ {
+ list = new ArrayList (capacity);
+ }
+
+ [ComVisible (false)]
+ public int Capacity {
+ get {
+ if (list == null)
+ list = new ArrayList ();
+
+ return list.Capacity;
+ }
+
+ set {
+ if (list == null)
+ list = new ArrayList ();
+
+ list.Capacity = value;
+ }
}
// Protected Instance Properties