using System.Collections; namespace System.Windows.Forms { public abstract class WrappedCollection : IList { protected abstract IList InnerList { get; } public int Count => InnerList.Count; void IList.Clear() => InnerList.Clear(); bool IList.Contains(object value) => InnerList.Contains(value); int IList.IndexOf(object value) => InnerList.IndexOf(value); IEnumerator IEnumerable.GetEnumerator() => InnerList.GetEnumerator(); bool IList.IsReadOnly => InnerList.IsReadOnly; bool IList.IsFixedSize => InnerList.IsFixedSize; object ICollection.SyncRoot => InnerList.SyncRoot; bool ICollection.IsSynchronized => InnerList.IsSynchronized; object IList.this[int index] { get => InnerList[index]; set => InnerList[index] = value; } void ICollection.CopyTo(Array array, int index) => InnerList.CopyTo(array, index); int IList.Add(object value) => InnerList.Add(value); void IList.Insert(int index, object value) => InnerList.Insert(index, value); void IList.Remove(object value) => InnerList.Remove(value); void IList.RemoveAt(int index) => InnerList.RemoveAt(index); } }