NameTable.Get 方法

定义

获取原子化字符串。Gets the atomized string.

重载

Get(String)

获取具有指定值的原子化字符串。Gets the atomized string with the specified value.

Get(Char[], Int32, Int32)

获取包含相同字符(与给定数组中指定范围的字符相同)的原子化字符串。Gets the atomized string containing the same characters as the specified range of characters in the given array.

注解

有关原子化字符串的详细信息,请参阅 NameTableFor more information on atomized strings, see NameTable.

Get(String)

获取具有指定值的原子化字符串。Gets the atomized string with the specified value.

public:
 override System::String ^ Get(System::String ^ value);
public override string Get (string value);
public override string? Get (string value);
override this.Get : string -> string
Public Overrides Function Get (value As String) As String

参数

value
String

要查找的名称。The name to find.

返回

String

原子化字符串对象;如果字符串尚未原子化,则为 nullThe atomized string object or null if the string has not already been atomized.

例外

valuenullvalue is null.

注解

有关原子化字符串的详细信息,请参阅 NameTableFor more information on atomized strings, see NameTable.

适用于

Get(Char[], Int32, Int32)

获取包含相同字符(与给定数组中指定范围的字符相同)的原子化字符串。Gets the atomized string containing the same characters as the specified range of characters in the given array.

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

参数

key
Char[]

包含要查找的名称的字符数组。The character array containing the name to find.

start
Int32

数组中指定名称第一个字符的从零开始的索引。The zero-based index into the array specifying the first character of the name.

len
Int32

名称中的字符数。The number of characters in the name.

返回

String

原子化字符串;如果字符串尚未原子化,则为 nullThe atomized string or null if the string has not already been atomized. 如果 len 为零,则返回 String.Empty。If len is zero, String.Empty is returned.

例外

0 > start0 > start

- 或 --or- start >= key.Lengthstart >= key.Length - 或 --or- len >= key.Lengthlen >= key.Length 如果 len =0,则上述条件不会导致引发异常。The above conditions do not cause an exception to be thrown if len =0.

len < 0。len < 0.

注解

有关原子化字符串的详细信息,请参阅 NameTableFor more information on atomized strings, see NameTable.

适用于