PropertyValueCollection.Item[Int32] 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置位于此集合的指定索引处的属性值。
public:
property System::Object ^ default[int] { System::Object ^ get(int index); void set(int index, System::Object ^ value); };
public object? this[int index] { get; set; }
public object this[int index] { get; set; }
member this.Item(int) : obj with get, set
Default Public Property Item(index As Integer) As Object
参数
- index
- Int32
属性值的从零开始的索引。
属性值
指定索引处的属性值。
例外
属性值为 null 引用(Visual Basic 中的 Nothing)。
索引小于零(0)或大于集合的大小。
注解
在 C# 中,此属性是类的 PropertyValueCollection 索引器。
在 JScript 中,可以使用类型定义的默认索引属性,但不能显式定义自己的属性。 但是,在类上指定 expando 属性会自动提供一个默认索引属性,其类型为 Object,其索引类型为 String。