System.Windows.Forms.ComboBox.Items Property

Gets an object representing the collection of the items contained in this System.Windows.Forms.ComboBox.


[System.ComponentModel.Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]
public ComboBox.ObjectCollection Items { get; }


Documentation for this section has not yet been entered.


This property enables you to obtain a reference to the list of items that are currently stored in the System.Windows.Forms.ComboBox. With this reference, you can add items, remove items, and obtain a count of the items in the collection.

Although the System.Windows.Forms.ComboBox is typically used to display text items, you can add any object to the System.Windows.Forms.ComboBox. Typically, the representation of an object in the System.Windows.Forms.ComboBox is the string returned by that object's object.ToString method. If you want to have a member of the object displayed instead, choose the member that will be displayed by setting the ListControl.DisplayMember property to the name of the appropriate member. You can also choose a member of the object that will represent the value returned by the object by setting the ListControl.ValueMember property. For more information, see System.Windows.Forms.ListControl.

For more information about the tasks that can be performed with the item collection, see the System.Windows.Forms.ComboBox.ObjectCollection class reference topics.


Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0,