ICSharpHelper.Identifier Method

Definition

Overloads

Identifier(String, ICollection<String>)

Generates a valid C# identifier from the specified string unique to the scope.

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

Generates a valid C# identifier from the specified string unique to the scope.

Identifier(String, ICollection<String>)

Generates a valid C# identifier from the specified string unique to the scope.

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

Parameters

name
String

The base identifier name.

scope
ICollection<String>

A list of in-scope identifiers.

Returns

The identifier.

Applies to

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

Generates a valid C# identifier from the specified string unique to the scope.

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

Parameters

name
String

The base identifier name.

scope
ICollection<String>

A list of in-scope identifiers.

capitalize
Nullable<Boolean>

true if the first letter should be converted to uppercase; false if the first letter should be converted to lowercase;

Returns

The identifier.

Applies to