RegexCollection.Insert(Int32, Regex) Method

Definition

Inserts an element into the RegexCollection at the specified index.

public:
 void Insert(int index, System::Text::RegularExpressions::Regex ^ value);
public void Insert (int index, System.Text.RegularExpressions.Regex value);
abstract member Insert : int * System.Text.RegularExpressions.Regex -> unit
Public Sub Insert (index As Integer, value As Regex)

Parameters

index
Int32

The zero-based index at which value should be inserted.

value
Regex

The regular expression to insert.

Exceptions

index is less than zero.-or- index is greater than Count.

The RegexCollection is read-only.-or-The RegexCollection has a fixed size.

Remarks

If Count already equals the capacity, the capacity of the list is doubled by automatically reallocating the internal array before the new element is inserted.

If index is equal to Count, value is added to the end of RegexCollection.

Applies to