次の方法で共有


PropertyValueCollection.Item プロパティ

このコレクションの指定したインデックスに配置されているプロパティ値を取得または設定します。

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

Public Default Property Item( _
   ByVal index As Integer _) As Object
[C#]
public object this[intindex] {get; set;}
[C++]
public: __property Object* get_Item(intindex);public: __property void set_Item(intindex,   Object*);
[JScript]
returnValue = PropertyValueCollectionObject.Item(index);PropertyValueCollectionObject.Item(index) = returnValue;またはreturnValue = PropertyValueCollectionObject(index);PropertyValueCollectionObject(index) = returnValue;

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

引数 [JScript]

  • index
    プロパティ値の 0 から始まるインデックス番号。

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

  • index
    プロパティ値の 0 から始まるインデックス番号。

プロパティ値

指定したインデックスにあるプロパティ値。

例外

例外の種類 条件
IndexOutOfRangeException インデックスが 0 未満か、コレクションのサイズを超える値です。
ArgumentNullException プロパティ値が null 参照 (Visual Basic では Nothing) です。

必要条件

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

.NET Framework セキュリティ:

参照

PropertyValueCollection クラス | PropertyValueCollection メンバ | System.DirectoryServices 名前空間