CommaDelimitedStringCollection.Insert(Int32, String) メソッド
定義
コレクション内の指定したインデックス位置に、文字列要素を追加します。Adds a string element to the collection at the specified index.
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
新しい要素が追加される位置を示す、コレクション内のインデックス。The index in the collection at which the new element will be added.
- value
- String
コレクションに追加する新しい要素の値。The value of the new element to add to the collection.
例
次のコード例は、Insert メソッドの使用方法を示します。The following code example demonstrates how to use the Insert method. このコード例は、クラスの概要に用意されている大規模な例の一部です CommaDelimitedStringCollection 。This code example is part of a larger example provided for the CommaDelimitedStringCollection class overview.
// 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
ます。This method causes the IsModified property to be set to true
.