ConcurrentNameTable.Add Method (char[], int, int)ConcurrentNameTable.Add Method (Char(), Integer, Integer)ConcurrentNameTable::Add Method (array<char>^, int, int)

Atomizes the specified string and adds it to the ConcurrentNameTableConcurrentNameTableConcurrentNameTable.

Syntax

Public Overrides Function Add( _
    array As Char[], _
    offset As Integer, _
    length As Integer _
) As String
public override string Add(
    char[] array,
    int offset,
    int length
)
public:
virtual String^ Add(
    array<char> array, 
    int offset, 
    int length
) override
 

Parameters

array

Type: System.Char[]System.Char()array<System::Char>^

The character array containing the name to add.

offset

Type: System.Int32System.Int32System::Int32

Zero-based index into the array specifying the first character of the name.

length

Type: System.Int32System.Int32System::Int32

The number of characters in the name.

Return Value

Type: System.StringSystem.StringSystem::String^

The new atomized string or the existing one if it already exists. If length is less than or equal to zero, EmptyEmptyEmpty is returned.

Exceptions

ExceptionCondition
NullReferenceExceptionNullReferenceExceptionNullReferenceExceptionarray is null a null reference (Nothing in Visual Basic) nullptr.
IndexOutOfRangeExceptionIndexOutOfRangeExceptionIndexOutOfRangeException offset and length identify a range that exceeds the bounds of array