123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System.Collections;
- namespace System.Windows.Forms
- {
- public class ObjectCollectionBase : WrappedCollection
- {
- protected internal IList items;
- protected override IList InnerList => items;
- public object this[int index]
- {
- get => items[index];
- set => items[index] = value;
- }
- public int Add(object obj) => items.Add(obj);
- public void AddRange(object[] objects)
- {
- foreach (object obj in objects)
- Add(obj);
- }
- public void Insert(int index, object obj) => items.Insert(index, obj);
- public void Remove(object obj) => items.Remove(obj);
- public void RemoveAt(int index) => items.RemoveAt(index);
- public void Clear() => items.Clear();
- public int IndexOf(object obj) => items.IndexOf(obj);
- public bool Contains(object obj) => items.Contains(obj);
- internal ObjectCollectionBase(IList items)
- {
- this.items = items;
- }
- }
- }
|