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 に設定されます。