14 references to Contains
System.Windows.Forms (4)
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
340
inDisplayedItemCollection = DisplayedItems.
Contains
(item);
350
if (itemCount != DisplayedItems.Count || (item is not null && (inDisplayedItemCollection != DisplayedItems.
Contains
(item))))
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2065
if (ParentInternal is not null && ParentInternal.Items.
Contains
(this) && ParentInternal.AllowItemReorder)
2102
Debug.Assert(Owner.Items.
Contains
(this), "How can there be a owner and not be in the collection?");
System.Windows.Forms.Tests (10)
System\Windows\Forms\ToolStripItemCollectionTests.cs (8)
283
collection.
Contains
(collection[0]).Should().BeTrue();
284
collection.
Contains
(collection[1]).Should().BeTrue();
298
toolStrip1.Items.
Contains
(items[0]).Should().BeFalse();
299
toolStrip1.Items.
Contains
(items[1]).Should().BeTrue();
300
collection.
Contains
(items[0]).Should().BeTrue();
328
toolStrip1.Items.
Contains
(items[0]).Should().BeFalse();
329
toolStrip1.Items.
Contains
(items[1]).Should().BeTrue();
330
collection.
Contains
(items[0]).Should().BeTrue();
System\Windows\Forms\ToolStripItemTests.cs (2)
10085
Assert.Equal(!disposing, owner.Items.
Contains
(item));
10093
Assert.Equal(!disposing, owner.Items.
Contains
(item));