This documentation is archived and is not being maintained.

ServiceDescriptionFormatExtensionCollection.Item Property

Gets or sets the value of a member of the ServiceDescriptionFormatExtensionCollection.

[C#] In C#, this property is the indexer for the ServiceDescriptionFormatExtensionCollection class.

[Visual Basic]
Public Default Property Item( _
   ByVal index As Integer _
) As Object
[C#]
public object this[
 int index
] {get; set;}
[C++]
public: __property Object* get_Item(
 int index
);
public: __property void set_Item(
 int index,
   Object*
);
[JScript]
returnValue = ServiceDescriptionFormatExtensionCollectionObject.Item(index);
ServiceDescriptionFormatExtensionCollectionObject.Item(index) = returnValue;
-or-
returnValue = ServiceDescriptionFormatExtensionCollectionObject(index);
ServiceDescriptionFormatExtensionCollectionObject(index) = returnValue;

[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.

Arguments [JScript]

index
The zero-based index of the member whose value is modified or returned.

Parameters [Visual Basic, C#, C++]

index
The zero-based index of the member whose value is modified or returned.

Property Value

A ServiceDescriptionFormatExtension.

Example

[Visual Basic] 
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] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ServiceDescriptionFormatExtensionCollection Class | ServiceDescriptionFormatExtensionCollection Members | System.Web.Services.Description Namespace

Show: