10 references to IndexOf
System.Windows.Forms (5)
System\Windows\Forms\Controls\TabControl\TabControl.TabPageCollection.cs (3)
96
return
IndexOf
(tabPage);
138
return
IndexOf
(page) != -1;
181
return
IndexOf
(tabPage);
System\Windows\Forms\Controls\TabControl\TabPage.cs (1)
167
int currentIndex = tabControl.TabPages.
IndexOf
(this);
System\Windows\Forms\Controls\TabControl\TabPage.TabAccessibleObject.cs (1)
76
private int CurrentIndex => OwningTabControl?.TabPages.
IndexOf
(_owningTabPage) ?? -1;
System.Windows.Forms.Tests (5)
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (5)
1858
Assert.Equal(0, collection.
IndexOf
(child1));
1859
Assert.Equal(1, collection.
IndexOf
(child2));
1860
Assert.Equal(-1, collection.
IndexOf
(new TabPage()));
1868
Assert.Equal(-1, collection.
IndexOf
(new TabPage()));
1876
Assert.Throws<ArgumentNullException>("page", () => collection.
IndexOf
(null));