Editar

Partilhar via


NameTable.Add Method

Definition

Atomizes the specified string and adds it to the NameTable.

Overloads

Add(String)

Atomizes the specified string and adds it to the NameTable.

Add(Char[], Int32, Int32)

Atomizes the specified string and adds it to the NameTable.

Remarks

For more information on atomized strings, see NameTable.

Add(String)

Source:
NameTable.cs
Source:
NameTable.cs
Source:
NameTable.cs

Atomizes the specified string and adds it to the NameTable.

public:
 override System::String ^ Add(System::String ^ key);
public override string Add (string key);
override this.Add : string -> string
Public Overrides Function Add (key As String) As String

Parameters

key
String

The string to add.

Returns

The atomized string or the existing string if it already exists in the NameTable.

Exceptions

key is null.

Remarks

For more information on atomized strings, see NameTable.

Applies to

Add(Char[], Int32, Int32)

Source:
NameTable.cs
Source:
NameTable.cs
Source:
NameTable.cs

Atomizes the specified string and adds it to the NameTable.

public:
 override System::String ^ Add(cli::array <char> ^ key, int start, int len);
public override string Add (char[] key, int start, int len);
override this.Add : char[] * int * int -> string
Public Overrides Function Add (key As Char(), start As Integer, len As Integer) As String

Parameters

key
Char[]

The character array containing the string to add.

start
Int32

The zero-based index into the array specifying the first character of the string.

len
Int32

The number of characters in the string.

Returns

The atomized string or the existing string if one already exists in the NameTable. If len is zero, String.Empty is returned.

Exceptions

0 > start

-or-

start >= key.Length

-or-

len >= key.Length

The above conditions do not cause an exception to be thrown if len =0.

Remarks

For more information on atomized strings, see NameTable.

Applies to