Ler em inglês Editar

Compartilhar 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 string Add (string key);

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

.NET 9 e outras versões
Produto Versões
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

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 string Add (char[] key, int start, int len);

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

.NET 9 e outras versões
Produto Versões
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0