Implemented interface member:
50 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; 844string[] strings = new string[Items.Count]; 845for (int i = 0; i < Items.Count; i++) 875ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(value, _itemsCollection?.Count ?? 0); 1961ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, _itemsCollection?.Count ?? 0); 2026if (Items.Count > 0) 2045if (Items.Count > 0) 2994newItems = new object[savedItems.Count]; 3185if (_itemsCollection.Count == 0) 3341return $"{s}, Items.Count: {_itemsCollection?.Count ?? 0}"; 3355int itemCount = (_itemsCollection is null) ? 0 : _itemsCollection.Count; 3394for (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)
844for (int i = 0; i < _columnTypesCombo.Items.Count; i++)
System.Windows.Forms.Tests (25)
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 (11)
414Assert.Equal(3, comboBoxObjectCollection.Count); 419Assert.Equal(0, comboBoxObjectCollection.Count); 442Assert.Equal(0, comboBoxObjectCollection.Count); 849Assert.Equal(1, comboBoxObjectCollection.Count); 871Assert.Equal(0, comboBoxObjectCollection.Count); 950Assert.Equal(1, comboBoxObjectCollection.Count); 974Assert.Equal(2, comboBoxObjectCollection.Count); 999Assert.Equal(2, comboBoxObjectCollection.Count); 1004Assert.Equal(1, comboBoxObjectCollection.Count); 1028Assert.Equal(1, comboBoxObjectCollection.Count); 1050Assert.Equal(0, comboBoxObjectCollection.Count);
System\Windows\Forms\ComboBoxTests.cs (8)
2433int count = comboBox.Items.Count; 2439Assert.Equal(comboBox.Items.Count, ++count); 2451int count = comboBox.Items.Count; 2457Assert.Equal(count - numberOfItemsToRemove, comboBox.Items.Count); 2468int count = comboBox.Items.Count; 2474Assert.Equal(count - number, comboBox.Items.Count); 2654if (index < 0 || index >= control.Items.Count) 2751Assert.Equal(numItems, comboBox.Items.Count);
WinFormsControlsTest (1)
ComboBoxesWithScrollBars.cs (1)
131if (e.Index < 0 || e.Index >= control.Items.Count)