System.Windows.Forms.ListBox.Items Property

Gets the items of the System.Windows.Forms.ListBox.

Syntax

[System.ComponentModel.MergableProperty(false)]
[System.ComponentModel.Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]
[System.ComponentModel.Localizable(true)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
public ListBox.ObjectCollection Items { get; }

Value

Documentation for this section has not yet been entered.

Remarks

This property enables you to obtain a reference to the list of items that are currently stored in the System.Windows.Forms.ListBox. With this reference, you can add items, remove items, and obtain a count of the items in the collection. For more information about the tasks that can be performed with the item collection, see the System.Windows.Forms.ListBox.ObjectCollection class reference topics.

You can also manipulate the items of a System.Windows.Forms.ListBox by using the ListControl.DataSource property. If you use the ListControl.DataSource property to add items to a System.Windows.Forms.ListBox, you can view the items in the System.Windows.Forms.ListBox using the ListBox.Items property but you cannot add or remove items from the list using the methods of the System.Windows.Forms.ListBox.ObjectCollection.

Requirements

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