14 references to Contains
System.Windows.Forms (4)
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
340inDisplayedItemCollection = DisplayedItems.Contains(item); 350if (itemCount != DisplayedItems.Count || (item is not null && (inDisplayedItemCollection != DisplayedItems.Contains(item))))
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2065if (ParentInternal is not null && ParentInternal.Items.Contains(this) && ParentInternal.AllowItemReorder) 2102Debug.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)
283collection.Contains(collection[0]).Should().BeTrue(); 284collection.Contains(collection[1]).Should().BeTrue(); 298toolStrip1.Items.Contains(items[0]).Should().BeFalse(); 299toolStrip1.Items.Contains(items[1]).Should().BeTrue(); 300collection.Contains(items[0]).Should().BeTrue(); 328toolStrip1.Items.Contains(items[0]).Should().BeFalse(); 329toolStrip1.Items.Contains(items[1]).Should().BeTrue(); 330collection.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));