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)
954int index = _itemsCollection.IndexOf(value);
System\Windows\Forms\Controls\ListBoxes\ListBox.ObjectCollection.cs (2)
263return IndexOf(value) != -1; 305int IList.IndexOf(object? value) => IndexOf(value!);
System\Windows\Forms\Controls\ListBoxes\ListBox.SelectedObjectCollection.cs (2)
262int index = items.IndexOf(value); 278int index = items.IndexOf(value);
System.Windows.Forms.Tests (12)
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (12)
4081Assert.Equal(-1, collection.IndexOf(0)); 4082Assert.Equal(-1, collection.IndexOf(1)); 4083Assert.Equal(-1, collection.IndexOf(new object())); 4096Assert.Equal(-1, collection.IndexOf(0)); 4097Assert.Equal(0, collection.IndexOf(1)); 4098Assert.Equal(-1, collection.IndexOf(2)); 4099Assert.Equal(-1, collection.IndexOf(new object())); 4104Assert.Equal(1, collection.IndexOf(0)); 4105Assert.Equal(0, collection.IndexOf(1)); 4106Assert.Equal(-1, collection.IndexOf(2)); 4107Assert.Equal(-1, collection.IndexOf(new object())); 4116Assert.Throws<ArgumentNullException>("value", () => collection.IndexOf(null));