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)
306collection.Contains(collection[0]).Should().BeTrue(); 307collection.Contains(collection[1]).Should().BeTrue(); 321toolStrip1.Items.Contains(items[0]).Should().BeFalse(); 322toolStrip1.Items.Contains(items[1]).Should().BeTrue(); 323collection.Contains(items[0]).Should().BeTrue(); 351toolStrip1.Items.Contains(items[0]).Should().BeFalse(); 352toolStrip1.Items.Contains(items[1]).Should().BeTrue(); 353collection.Contains(items[0]).Should().BeTrue();
System\Windows\Forms\ToolStripItemTests.cs (2)
10087Assert.Equal(!disposing, owner.Items.Contains(item)); 10095Assert.Equal(!disposing, owner.Items.Contains(item));