ICodeGenerator.CreateEscapedIdentifier(String) 方法

定義

為指定值建立逸出識別項。

public:
 System::String ^ CreateEscapedIdentifier(System::String ^ value);
public string CreateEscapedIdentifier (string value);
abstract member CreateEscapedIdentifier : string -> string
Public Function CreateEscapedIdentifier (value As String) As String

參數

value
String

要建立逸出識別項的字串。

傳回

String

值的逸出識別項。

備註

CreateEscapedIdentifier 測試識別碼是否與保留或語言關鍵字衝突,如果是,則會傳回具有特定語言逸出程式碼格式的對等名稱。 這稱為逸出識別碼。 逸出識別碼會包含相同的 value ,但會新增逸出程式碼格式,以區分識別碼與 關鍵字。 兩個實作範例前面 value 會有 「@」 或以 「[」 和 「]」 括住 value 的 。

適用於

另請參閱