CommaDelimitedStringCollection.Insert(Int32, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在指定的索引處為集合加入一個字串元素。
public:
void Insert(int index, System::String ^ value);
public void Insert(int index, string value);
override this.Insert : int * string -> unit
Public Sub Insert (index As Integer, value As String)
參數
- index
- Int32
集合中將加入新元素的索引。
- value
- String
新增元素要加入集合的值。
範例
以下程式碼範例示範如何使用此 Insert 方法。 這個程式碼範例是為類別概述提供 CommaDelimitedStringCollection 的完整範例的一部分。
// Insert a new element in the collection.
myStrCollection.Insert(myStrCollection.Count, "userNameX");
' Insert a new element in the collection.
myStrCollection.Insert(myStrCollection.Count, "userNameX")
備註
此方法使屬性 IsModified 被設定為 true。