70 references to Insert
System.Windows.Forms (1)
System\Windows\Forms\Controls\ListBoxes\ListBox.ObjectCollection.cs (1)
363void IList.Insert(int index, object? item) => Insert(index, item!);
System.Windows.Forms.Design (3)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (3)
144_selectedColumns.Items.Insert(selectedIndex, new ListBoxItem(newColumn!, this, newColumnDesigner)); 670_selectedColumns.Items.Insert(selectedIndex + 1, item); 716_selectedColumns.Items.Insert(selectedIndex, item);
System.Windows.Forms.Tests (65)
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (65)
4128collection.Insert(0, 1); 4136collection.Insert(0, 2); 4144collection.Insert(1, 2); 4152collection.Insert(3, 3); 4169collection.Insert(0, 1); 4177collection.Insert(0, 2); 4185collection.Insert(0, 2); 4193collection.Insert(3, 3); 4213collection.Insert(0, 1); 4221collection.Insert(0, 2); 4229collection.Insert(0, 2); 4237collection.Insert(3, 3); 4257collection.Insert(0, 1); 4265collection.Insert(0, 2); 4273collection.Insert(0, 2); 4281collection.Insert(3, 3); 4304collection.Insert(0, 1); 4317collection.Insert(0, 2); 4332collection.Insert(0, 2); 4349collection.Insert(3, 3); 4383collection.Insert(0, 1); 4396collection.Insert(0, 2); 4411collection.Insert(0, 2); 4428collection.Insert(3, 3); 4465collection.Insert(0, 1); 4478collection.Insert(0, 2); 4493collection.Insert(0, 2); 4510collection.Insert(3, 3); 4547collection.Insert(0, 1); 4560collection.Insert(0, 2); 4575collection.Insert(0, 2); 4592collection.Insert(3, 3); 4624collection.Insert(3, 0); 4632collection.Insert(4, 5); 4654collection.Insert(3, 0); 4660collection.Insert(4, 5); 4686collection.Insert(3, 0); 4694collection.Insert(2, 2); 4702collection.Insert(3, 4); 4728collection.Insert(3, 0); 4735collection.Insert(2, 2); 4742collection.Insert(4, 5); 4769collection.Insert(3, 0); 4780collection.Insert(4, 5); 4814collection.Insert(3, 0); 4825collection.Insert(4, 5); 4863collection.Insert(3, 0); 4874collection.Insert(2, 2); 4885collection.Insert(3, 4); 4923collection.Insert(3, 0); 4934collection.Insert(2, 2); 4945collection.Insert(4, 5); 4961collection.Insert(0, 2); 4962collection.Insert(1, 1); 4963collection.Insert(2, 1); 4964collection.Insert(3, 3); 4975collection.Insert(0, 2); 4976collection.Insert(1, 1); 4977collection.Insert(2, 1); 4978collection.Insert(3, 3); 5000Assert.Throws<ArgumentOutOfRangeException>("index", () => collection.Insert(index, 1)); 5014Assert.Throws<ArgumentOutOfRangeException>("index", () => collection.Insert(index, 1)); 5022Assert.Throws<ArgumentNullException>("item", () => collection.Insert(0, null)); 5033Assert.Throws<ArgumentException>(() => collection.Insert(0, 1)); 5050Assert.Throws<OutOfMemoryException>(() => collection.Insert(0, 1));
System.Windows.Forms.UI.IntegrationTests (1)
DragDropTests.cs (1)
835ListDragTarget.Items.Insert(_indexOfItemUnderMouseToDrop, item);