次の方法で共有


CheckedListBox.CheckedItemCollection.IndexOf メソッド

チェックされている項目のコレクションへのインデックスを返します。

Public Overridable Function IndexOf( _
   ByVal item As Object _) As Integer Implements IList.IndexOf
[C#]
public virtual int IndexOf(objectitem);
[C++]
public: virtual int IndexOf(Object* item);
[JScript]
public function IndexOf(
   item : Object) : int;

パラメータ

  • item
    検索する対象となるインデックスのオブジェクト。このオブジェクトは、チェックされている項目のコレクションに属している必要があります。

戻り値

チェックされている項目のコレクション内のオブジェクトのインデックス。オブジェクトがコレクション内にない場合は -1。詳細については、 CheckedListBox.CheckedItemCollection クラスのトピックの概要にある例を参照してください。

実装

IList.IndexOf

解説

CheckedItems コレクションは Items コレクションのオブジェクトのサブセットであり、チェックされている項目だけを表します。このコレクションは、昇順に並んでいます。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

CheckedListBox.CheckedItemCollection クラス | CheckedListBox.CheckedItemCollection メンバ | System.Windows.Forms 名前空間 | Item