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