次の方法で共有


ServiceDescriptionFormatExtensionCollection.Item プロパティ

ServiceDescriptionFormatExtensionCollection のメンバの値を取得または設定します。

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

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 = ServiceDescriptionFormatExtensionCollectionObject.Item(index);ServiceDescriptionFormatExtensionCollectionObject.Item(index) = returnValue;またはreturnValue = ServiceDescriptionFormatExtensionCollectionObject(index);ServiceDescriptionFormatExtensionCollectionObject(index) = returnValue;

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

引数 [JScript]

  • index
    値が変更または返されるメンバの、0 から始まるインデックス番号。

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

  • index
    値が変更または返されるメンバの、0 から始まるインデックス番号。

プロパティ値

ServiceDescriptionFormatExtension

使用例

 
Console.WriteLine("Collection contains following types of elements: ")
' Display the 'Type' of the elements in collection.
Dim i As Integer
For i = 0 To myCollection.Count - 1
   Console.WriteLine(myCollection(i).GetType().ToString())
Next i

[C#] 
Console.WriteLine("Collection contains following types of elements: ");
// Display the 'Type' of the elements in collection.
for(int i = 0;i< myCollection.Count;i++) 
{
   Console.WriteLine(myCollection[i].GetType().ToString()); 
}

[C++] 
Console::WriteLine(S"Collection contains following types of elements: ");
// Display the 'Type' of the elements in collection.
for (int i = 0;i< myCollection->Count;i++) 
   Console::WriteLine(myCollection->Item[i]->GetType());

[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 ファミリ

参照

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