StringCollection.Item[Int32] 属性  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置指定索引处的元素。
public:
 property System::String ^ default[int] { System::String ^ get(int index); void set(int index, System::String ^ value); };
	public string this[int index] { get; set; }
	public string? this[int index] { get; set; }
	member this.Item(int) : string with get, set
	Default Public Property Item(index As Integer) As String
	参数
- index
 - Int32
 
要获取或设置的项的从零开始的索引。
属性值
指定索引处的元素。
例外
注解
通过此属性,可以使用以下语法来访问集合中的特定元素:myCollection[index]。
              StringCollection 接受 null 为有效值,并允许重复的元素。
C# 语言使用此关键字 (keyword) 来定义索引器,而不是实现 Item[] 属性。 Visual Basic 实现 Item[] 为 默认属性,该属性提供相同的索引功能。
检索此属性的值是 O (1) 操作;设置 属性也是 O (1) 操作。