ICSharpHelper.Identifier 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| 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>)
- Source:
- 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>)
- Source:
- ICSharpHelper.cs
- Source:
- ICSharpHelper.cs
- Source:
- ICSharpHelper.cs
- Source:
- ICSharpHelper.cs
- Source:
- ICSharpHelper.cs
- Source:
- 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>
作用域内标识符的列表。
返回
标识符。
适用于
Identifier<T>(String, T, IDictionary<String,T>, Nullable<Boolean>)
- Source:
- ICSharpHelper.cs
- Source:
- ICSharpHelper.cs
- Source:
- 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>
作用域内标识符的列表。
返回
标识符。