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)
4130collection.Insert(0, 1); 4138collection.Insert(0, 2); 4146collection.Insert(1, 2); 4154collection.Insert(3, 3); 4171collection.Insert(0, 1); 4179collection.Insert(0, 2); 4187collection.Insert(0, 2); 4195collection.Insert(3, 3); 4215collection.Insert(0, 1); 4223collection.Insert(0, 2); 4231collection.Insert(0, 2); 4239collection.Insert(3, 3); 4259collection.Insert(0, 1); 4267collection.Insert(0, 2); 4275collection.Insert(0, 2); 4283collection.Insert(3, 3); 4306collection.Insert(0, 1); 4319collection.Insert(0, 2); 4334collection.Insert(0, 2); 4351collection.Insert(3, 3); 4385collection.Insert(0, 1); 4398collection.Insert(0, 2); 4413collection.Insert(0, 2); 4430collection.Insert(3, 3); 4467collection.Insert(0, 1); 4480collection.Insert(0, 2); 4495collection.Insert(0, 2); 4512collection.Insert(3, 3); 4549collection.Insert(0, 1); 4562collection.Insert(0, 2); 4577collection.Insert(0, 2); 4594collection.Insert(3, 3); 4626collection.Insert(3, 0); 4634collection.Insert(4, 5); 4656collection.Insert(3, 0); 4662collection.Insert(4, 5); 4688collection.Insert(3, 0); 4696collection.Insert(2, 2); 4704collection.Insert(3, 4); 4730collection.Insert(3, 0); 4737collection.Insert(2, 2); 4744collection.Insert(4, 5); 4771collection.Insert(3, 0); 4782collection.Insert(4, 5); 4816collection.Insert(3, 0); 4827collection.Insert(4, 5); 4865collection.Insert(3, 0); 4876collection.Insert(2, 2); 4887collection.Insert(3, 4); 4925collection.Insert(3, 0); 4936collection.Insert(2, 2); 4947collection.Insert(4, 5); 4963collection.Insert(0, 2); 4964collection.Insert(1, 1); 4965collection.Insert(2, 1); 4966collection.Insert(3, 3); 4977collection.Insert(0, 2); 4978collection.Insert(1, 1); 4979collection.Insert(2, 1); 4980collection.Insert(3, 3); 5002Assert.Throws<ArgumentOutOfRangeException>("index", () => collection.Insert(index, 1)); 5016Assert.Throws<ArgumentOutOfRangeException>("index", () => collection.Insert(index, 1)); 5024Assert.Throws<ArgumentNullException>("item", () => collection.Insert(0, null)); 5035Assert.Throws<ArgumentException>(() => collection.Insert(0, 1)); 5052Assert.Throws<OutOfMemoryException>(() => collection.Insert(0, 1));
System.Windows.Forms.UI.IntegrationTests (1)
DragDropTests.cs (1)
894ListDragTarget.Items.Insert(_indexOfItemUnderMouseToDrop, item);