18 references to IndexOf
PresentationUI (1)
MS\Internal\Documents\CredentialManagerDialog.cs (1)
68
_credListBox.SelectedIndex = _credListBox.Items.
IndexOf
(defaultAccount);
System.Windows.Forms (5)
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
954
int index = _itemsCollection.
IndexOf
(value);
System\Windows\Forms\Controls\ListBoxes\ListBox.ObjectCollection.cs (2)
263
return
IndexOf
(value) != -1;
305
int IList.IndexOf(object? value) =>
IndexOf
(value!);
System\Windows\Forms\Controls\ListBoxes\ListBox.SelectedObjectCollection.cs (2)
262
int index = items.
IndexOf
(value);
278
int index = items.
IndexOf
(value);
System.Windows.Forms.Tests (12)
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (12)
4081
Assert.Equal(-1, collection.
IndexOf
(0));
4082
Assert.Equal(-1, collection.
IndexOf
(1));
4083
Assert.Equal(-1, collection.
IndexOf
(new object()));
4096
Assert.Equal(-1, collection.
IndexOf
(0));
4097
Assert.Equal(0, collection.
IndexOf
(1));
4098
Assert.Equal(-1, collection.
IndexOf
(2));
4099
Assert.Equal(-1, collection.
IndexOf
(new object()));
4104
Assert.Equal(1, collection.
IndexOf
(0));
4105
Assert.Equal(0, collection.
IndexOf
(1));
4106
Assert.Equal(-1, collection.
IndexOf
(2));
4107
Assert.Equal(-1, collection.
IndexOf
(new object()));
4116
Assert.Throws<ArgumentNullException>("value", () => collection.
IndexOf
(null));