Usual.Item Property (String)
|
|
使用零为基础的数组索引来获取/设置数组元素。
命名空间:
XSharp
程序集:
XSharp.RT (在 XSharp.RT.dll 中) 版本:2.24 GA
Syntax PROPERTY SELF[
name AS STRING
] AS USUAL GET SET
public Usual this[
string name
] { get; set; } Request Example
查看代码Parameters
- name
- 类型:String
存储在位置索引中的元素的属性的名称。如果元素实现了 IIndexedProperties 接口,
那么在这个元素上带有字符串参数的索引器将被调用。否则,运行时将使用反射来找到
元素上的字段或属性,并返回它的值
Return Value
类型:
UsualThe element stored at the indicated location in the collection.
Implements
ItemString
备注
在你的 PRG 代码中,你可以使用一为基础的数组索引来访问元素。 编译器会识别到这个属性是实现了一个特殊接口的类型的一部分
并且会从索引中减去一,除非启用了/az编译器选项。
备注When the contents of the USUAL is not an array or does not name based indexing then a runtime error is generated.
See Also