次の方法で共有


OperationCollection.Item プロパティ

指定した 0 から始まるインデックス番号にある Operation の値を取得または設定します。

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

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

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

引数 [JScript]

  • index
    変更または返される値を持つ Operation に対応する、0 から始まるインデックス番号。

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

  • index
    変更または返される値を持つ Operation に対応する、0 から始まるインデックス番号。

プロパティ値

Operation

使用例

[Visual Basic, C#, C++] 0 から始まるインデックス番号を使用し、 OperationCollection のメンバを取得する方法を次の例に示します。

 
myOperationCollection.Remove(myOperation)
' Insert the 'myOpearation' operation at the index '0'.
myOperationCollection.Insert(0, myOperation)
Console.WriteLine("The operation at index '0' is : " + _
                  myOperationCollection.Item(0).Name)

[C#] 
myOperationCollection.Remove(myOperation);
// Insert the 'myOpearation' operation at the index '0'.
myOperationCollection.Insert(0, myOperation);
Console.WriteLine("The operation at index '0' is : " +
                  myOperationCollection[0].Name);

[C++] 
myOperationCollection->Remove(myOperation);
// Insert the 'myOpearation' operation at the index '0'.
myOperationCollection->Insert(0, myOperation);
Console::WriteLine(S"The operation at index '0' is : {0}", myOperationCollection->Item[0]->Name);

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

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

参照

OperationCollection クラス | OperationCollection メンバ | System.Web.Services.Description 名前空間