語言

ICSharpHelper.Identifier 方法

定義

多載

名稱 Description
Identifier(String, ICollection<String>)

從指定的字串產生一個有效的 C# 識別碼,且該字串對作用域來說是唯一的。

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

從指定的字串產生一個有效的 C# 識別碼,且該字串對作用域來說是唯一的。

Identifier<T>(String, T, IDictionary<String,T>, Nullable<Boolean>)

從指定的字串產生一個有效的 C# 識別碼,且該字串對作用域來說是唯一的。

Identifier(String, ICollection<String>)

來源:
ICSharpHelper.cs

從指定的字串產生一個有效的 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>)

來源:
ICSharpHelper.cs
來源:
ICSharpHelper.cs
來源:
ICSharpHelper.cs
來源:
ICSharpHelper.cs
來源:
ICSharpHelper.cs
來源:
ICSharpHelper.cs

從指定的字串產生一個有效的 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 如果第一個字母應該轉為小寫;

傳回

識別碼。

適用於

Identifier<T>(String, T, IDictionary<String,T>, Nullable<Boolean>)

來源:
ICSharpHelper.cs
來源:
ICSharpHelper.cs
來源:
ICSharpHelper.cs

從指定的字串產生一個有效的 C# 識別碼,且該字串對作用域來說是唯一的。

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

類型參數

T

參數

name
String

基礎識別碼名稱。

value
T

將與識別碼相關聯的值。

scope
IDictionary<String,T>

一份範圍內識別碼的清單。

capitalize
Nullable<Boolean>

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

傳回

識別碼。

適用於