Share via


CheckedListBox.CheckedItemCollection.Item 属性

获取选中项集合中的一个对象。

**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)

语法

声明
Public Default Property Item ( _
    index As Integer _
) As Object
用法
Dim instance As CheckedItemCollection
Dim index As Integer
Dim value As Object

value = instance(index)

instance(index) = value
public Object this [
    int index
] { get; set; }
public:
virtual property Object^ default [int] {
    Object^ get (int index) sealed;
    void set (int index, Object^ value) sealed;
}
/** @property */
public final Object get_Item (int index)

/** @property */
public final void set_Item (int index, Object value)
JScript 支持使用索引属性,但不支持进行新的声明。

参数

  • index
    选中项集合中的一个索引。该集合索引对应于选中项的索引。

属性值

指定索引处的对象。有关更多信息,请参见 CheckedListBox.CheckedItemCollection 类概述中的示例。

异常

异常类型 条件

NotSupportedException

无法设置对象。

备注

CheckedItems 集合是 Items 集合中对象的子集,仅表示选中的项。此集合按升序排序。

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

CheckedListBox.CheckedItemCollection 类
CheckedListBox.CheckedItemCollection 成员
System.Windows.Forms 命名空间
IndexOf