다음을 통해 공유


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.Int32

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

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

See Also

Reference

RegexCollection Interface

Insert Overload

Microsoft.Office.Tools Namespace