. NET Framework class library |
|
Ilist. Item attributes
Obtains or sets the elements at the specified index when the class is implemented.
[C #] in C #, this attribute isIlistClass indexer.
[Visual Basic]Default property item (_ byvalIndexAsInteger_)Object [C #]Object this [Int Index] {Get; set ;}[C ++]_ PropertyObject* Get_item ( Int Index);_ Property void set_item ( Int Index,Object *);[JScript]Returnvalue=Ilistobject. Item (Index);Ilistobject. Item (Index) =Returnvalue;-Or-Returnvalue=Ilistobject(Index);Ilistobject(Index) =Returnvalue;
[JScript] In JScript, you can use the default index attributes defined by a type, but cannot explicitly define your own index attributes. However, specifyExpandoFeature will automatically provide a typeObjectAnd the index type isString.
Parameter [JScript]
-
Index
-
The index of the element to be obtained or set starting from scratch.
Parameter [Visual Basic, C #, C ++]
-
Index
-
The index of the element to be obtained or set starting from scratch.
Attribute Value
Specifies the element at the index.
Exception
Exception type |
Condition |
Argumentoutofrangeexception |
IndexIt is not a valid index in ilist. |
Notsupportedexception |
Set this attribute and the ilist is read-only. |
Remarks
By using the following syntax, this attribute provides the ability to access specific elements in the collection:myCollection[index]
.
Requirements
Platform:Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 series, common language infrastructure (CLI) Standard
See
Ilist interface | ilist member | system. Collections namespace