14 references to Contains
System.Windows.Forms (4)
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
337inDisplayedItemCollection = DisplayedItems.Contains(item); 347if (itemCount != DisplayedItems.Count || (item is not null && (inDisplayedItemCollection != DisplayedItems.Contains(item))))
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2057if (ParentInternal is not null && ParentInternal.Items.Contains(this) && ParentInternal.AllowItemReorder) 2094Debug.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)
308collection.Contains(collection[0]).Should().BeTrue(); 309collection.Contains(collection[1]).Should().BeTrue(); 323toolStrip1.Items.Contains(items[0]).Should().BeFalse(); 324toolStrip1.Items.Contains(items[1]).Should().BeTrue(); 325collection.Contains(items[0]).Should().BeTrue(); 353toolStrip1.Items.Contains(items[0]).Should().BeFalse(); 354toolStrip1.Items.Contains(items[1]).Should().BeTrue(); 355collection.Contains(items[0]).Should().BeTrue();
System\Windows\Forms\ToolStripItemTests.cs (2)
10085Assert.Equal(!disposing, owner.Items.Contains(item)); 10093Assert.Equal(!disposing, owner.Items.Contains(item));