Export (0) Print
Expand All

ListControl.SelectedIndex Property

When overridden in a derived class, gets or sets the zero-based index of the currently selected item.

[Visual Basic]
Public MustOverride Property SelectedIndex As Integer
[C#]
public abstract int SelectedIndex {get; set;}
[C++]
public: __property virtual int get_SelectedIndex() = 0;
public: __property virtual void set_SelectedIndex(int) = 0;
[JScript]
public abstract function get SelectedIndex() : int;
public abstract function set SelectedIndex(int);

Property Value

A zero-based index of the currently selected item. A value of negative one (-1) is returned if no item is selected.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

ListControl Class | ListControl Members | System.Windows.Forms Namespace

Show:
© 2014 Microsoft