StringUtilsToValidVariableName Method |
Generate a valid C# variable name for the specified string.
The basic rules are: 1) prepend and underbar if 1st character is not an underbar or letter,
2) replace any non-alphanumeric-non-underbar with an underbar.
Namespace:
NetQuarry
Assembly:
EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax public static string ToValidVariableName(
string name
)
Public Shared Function ToValidVariableName (
name As String
) As String
Parameters
- name
- Type: SystemString
The name to convert.
Return Value
Type:
StringThe valid variable name.
See Also