SelectedIndex Property
Collapse the table of content
Expand the table of content

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
public abstract int SelectedIndex {get; set;}
public: __property virtual int get_SelectedIndex() = 0;
public: __property virtual void set_SelectedIndex(int) = 0;
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.


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

© 2016 Microsoft