ComboBox.ObjectCollection.AddRange Method (Object)
Adds an array of items to the list of items for a ComboBox.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
If the Sorted property of the ComboBox is set to true, the items are inserted into the list alphabetically. Otherwise, the items are inserted in the order they occur within the array. This method is typically passed an array of String objects, but an array of any type of object can be passed to this method. When an object is added to the collection, the method calls the object's ToString method to obtain the string to display in the list. When using this method to add items to the collection, you do not need to call the BeginUpdate and EndUpdate methods to optimize performance.
The following code example demonstrates how to initialize a ComboBox control by setting the text property and using the method to populate the ComboBox. It also demonstrates handling the DropDown event. To run the example, paste the following code in a form and call the InitializeComboBox method from the form's constructor or Load method.
Available since 1.1