Implemented interface member:
42 references to Count
System.Windows.Forms (23)
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxAccessibleObject.cs (1)
209if (selectedIndex < 0 || selectedIndex > owner.Items.Count - 1)
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildListUiaProvider.cs (2)
103if (index < 0 || index >= _owningComboBox.Items.Count) 120return _owningComboBox.Items.Count;
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (12)
791int itemCount = Items.Count + 1; 845string[] strings = new string[Items.Count]; 846for (int i = 0; i < Items.Count; i++) 876ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(value, _itemsCollection?.Count ?? 0); 1963ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, _itemsCollection?.Count ?? 0); 2028if (Items.Count > 0) 2047if (Items.Count > 0) 2996newItems = new object[savedItems.Count]; 3187if (_itemsCollection.Count == 0) 3343return $"{s}, Items.Count: {_itemsCollection?.Count ?? 0}"; 3357int itemCount = (_itemsCollection is null) ? 0 : _itemsCollection.Count; 3396for (int i = 0; i < Items.Count; i++)
System\Windows\Forms\Controls\ComboBox\ComboBox.ObjectCollection.cs (7)
128index = InnerList.BinarySearch(index: 0, Count, entry, this); 134Debug.Assert(index >= 0 && index <= Count, "Wrong index for insert"); 151index = Count - 1; 219ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, Count); 314ArgumentOutOfRangeException.ThrowIfGreaterThan(index, Count); 362ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, Count); 408ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, Count);
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (1)
448return $"{base.ToString()}, Items.Count: {Items.Count}";
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
837for (int i = 0; i < _columnTypesCombo.Items.Count; i++)
System.Windows.Forms.Tests (17)
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxAccessibleObjectTests.cs (5)
419Assert.Equal(comboBox.Items.Count, accessibleObject.ItemAccessibleObjects.Count); 435Assert.Equal(comboBox.Items.Count, accessibleObject.ItemAccessibleObjects.Count); 453Assert.Equal(comboBox.Items.Count, accessibleObject.ItemAccessibleObjects.Count); 476Assert.Equal(comboBox.Items.Count - 1, accessibleObject.ItemAccessibleObjects.Count); 482Assert.Equal(comboBox.Items.Count, accessibleObject.ItemAccessibleObjects.Count);
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (1)
490if (e.Index < 0 || e.Index >= Items.Count)
System\Windows\Forms\Combobox.ObjectCollectionTests.cs (3)
414Assert.Equal(3, comboBoxObjectCollection.Count); 974Assert.Equal(2, comboBoxObjectCollection.Count); 999Assert.Equal(2, comboBoxObjectCollection.Count);
System\Windows\Forms\ComboBoxTests.cs (8)
2432int count = comboBox.Items.Count; 2438Assert.Equal(comboBox.Items.Count, ++count); 2450int count = comboBox.Items.Count; 2456Assert.Equal(count - numberOfItemsToRemove, comboBox.Items.Count); 2467int count = comboBox.Items.Count; 2473Assert.Equal(count - number, comboBox.Items.Count); 2653if (index < 0 || index >= control.Items.Count) 2750Assert.Equal(numItems, comboBox.Items.Count);
WinFormsControlsTest (1)
ComboBoxesWithScrollBars.cs (1)
131if (e.Index < 0 || e.Index >= control.Items.Count)