CheckedListBox.CheckedIndexCollection.cs 569 B

1234567891011121314151617181920
  1. using System.Collections;
  2. namespace System.Windows.Forms
  3. {
  4. public partial class CheckedListBox
  5. {
  6. public class CheckedIndexCollection : CollectionBase
  7. {
  8. private static string message = "Collection is read only.";
  9. public int this[int index] => (int)List[index];
  10. internal void Add(int index) => List.Add(index);
  11. public new void Clear() => throw new NotSupportedException(message);
  12. public new void RemoveAt(int index) => throw new NotSupportedException(message);
  13. }
  14. }
  15. }