using System.Collections; namespace System.Windows.Forms { public partial class CheckedListBox { public class CheckedIndexCollection : CollectionBase { private static string message = "Collection is read only."; public int this[int index] => (int)List[index]; internal void Add(int index) => List.Add(index); public new void Clear() => throw new NotSupportedException(message); public new void RemoveAt(int index) => throw new NotSupportedException(message); } } }