16 references to IndexOf
System.Windows.Forms (9)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (1)
105
int subItemIndex = _owningItem.SubItems.
IndexOf
(subItemAccessibleObject.OwningSubItem);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemTileAccessibleObject.cs (1)
95
int index = _owningItem.SubItems.
IndexOf
(subItemAccessibleObject.OwningSubItem);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (3)
101
return _owner._listView.GetSubItemRect(_owner.Index, _owner.SubItems.
IndexOf
(this));
187
internal int Index => _owner is null ? -1 : _owner.SubItems.
IndexOf
(this);
209
_owner?.UpdateSubItems(_owner.SubItems.
IndexOf
(this));
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItemCollection.cs (4)
191
return
IndexOf
(Add(itemValue));
211
public bool Contains(ListViewSubItem? subItem) =>
IndexOf
(subItem) != -1;
262
return
IndexOf
(subItemValue);
329
int index =
IndexOf
(item);
System.Windows.Forms.Tests (7)
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (1)
1164
int subItemIndex = listView.Items[0].SubItems.
IndexOf
(listViewSubItem);
System\Windows\Forms\ListViewSubItemCollectionTests.cs (6)
539
Assert.Equal(0, collection.
IndexOf
(subItem));
540
Assert.Equal(-1, collection.
IndexOf
(new ListViewItem.ListViewSubItem()));
541
Assert.Equal(-1, collection.
IndexOf
(null));
550
Assert.Equal(-1, collection.
IndexOf
(new ListViewItem.ListViewSubItem()));
551
Assert.Equal(-1, collection.
IndexOf
(null));
588
Assert.Equal(-1, collection.
IndexOf
(null));