次の方法で共有


ComponentCollection.Item プロパティ (Int32)

コレクション内の指定したインデックス位置の Component を取得します。

[C#] C# では、このプロパティは ComponentCollection クラスのインデクサになります。

Overloads Public Overridable Default ReadOnly Property Item( _
   ByVal index As Integer _) As IComponent
[C#]
public virtual IComponent this[intindex] {get;}
[C++]
public: __property virtual IComponent* get_Item(intindex);
[JScript]
returnValue = ComponentCollectionObject.Item(index);またはreturnValue = ComponentCollectionObject(index);

[JScript] JScript では、この型で定義されている既定のインデックス プロパティを使用することができます。しかし、独自のインデックス プロパティを明示的に定義することはできません。ただし、このクラスの expando 属性を指定すると、既定のインデックス プロパティが提供されます。提供されるインデックス プロパティの型は Object 型であり、インデックス型は String になります。

引数 [JScript]

  • index
    取得する Component のコレクション インデックス。

パラメータ [Visual Basic, C#, C++]

  • index
    取得する Component のコレクション インデックス。

プロパティ値

指定したインデックス番号の IComponent オブジェクト。

例外

例外の種類 条件
ArgumentOutOfRangeException 指定したインデックスが、コレクションのインデックスの範囲外にある場合。

解説

このメソッドは、派生クラスでオーバーライドできます。

必要条件

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

参照

ComponentCollection クラス | ComponentCollection メンバ | System.ComponentModel 名前空間 | ComponentCollection.Item オーバーロードの一覧