共用方式為


ICSharpHelper.Identifier 方法

定義

多載

Identifier(String, ICollection<String>)

從範圍唯一的指定字串產生有效的 C# 識別碼。

Identifier(String, ICollection<String>, Nullable<Boolean>)

從範圍唯一的指定字串產生有效的 C# 識別碼。

Identifier(String, ICollection<String>)

從範圍唯一的指定字串產生有效的 C# 識別碼。

public string Identifier (string name, System.Collections.Generic.ICollection<string> scope = default);
abstract member Identifier : string * System.Collections.Generic.ICollection<string> -> string
Public Function Identifier (name As String, Optional scope As ICollection(Of String) = Nothing) As String

參數

name
String

基底識別碼名稱。

scope
ICollection<String>

範圍內識別碼的清單。

傳回

識別碼。

適用於

Identifier(String, ICollection<String>, Nullable<Boolean>)

從範圍唯一的指定字串產生有效的 C# 識別碼。

public string Identifier (string name, System.Collections.Generic.ICollection<string>? scope = default, bool? capitalize = default);
abstract member Identifier : string * System.Collections.Generic.ICollection<string> * Nullable<bool> -> string
Public Function Identifier (name As String, Optional scope As ICollection(Of String) = Nothing, Optional capitalize As Nullable(Of Boolean) = Nothing) As String

參數

name
String

基底識別碼名稱。

scope
ICollection<String>

範圍內識別碼的清單。

capitalize
Nullable<Boolean>

true 如果第一個字母應該轉換成大寫則為 ; false 如果第一個字母應該轉換成小寫則為 ;

傳回

識別碼。

適用於