RegexCollection.Insert Method (Int32, Regex)
Inserts an element into the RegexCollection at the specified index.
Namespace: Microsoft.Office.Tools
Assembly: Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)
Syntax
'Declaration
Sub Insert ( _
index As Integer, _
value As Regex _
)
void Insert(
int index,
Regex value
)
Parameters
index
Type: System.Int32The zero-based index at which value should be inserted.
value
Type: System.Text.RegularExpressions.RegexThe regular expression to insert.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | index is less than zero. -or- index is greater than Count. |
NotSupportedException | 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.