System.Windows.Forms.ListBox.ClearSelected Method

Unselects all items in the System.Windows.Forms.ListBox.

Syntax

public void ClearSelected ()

Remarks

Calling this method is equivalent to setting the ListBox.SelectedIndex property to negative one (-1). You can use this method to quickly unselect all items in the list.

Requirements

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