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