ICodeGenerator::CreateValidIdentifier Method (String^)
.NET Framework (current version)
Creates a valid identifier for the specified value.
Assembly: System (in System.dll)
[PermissionSetAttribute(SecurityAction::LinkDemand, Name = "FullTrust")] [PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = "FullTrust")] String^ CreateValidIdentifier( String^ value )
Parameters
- value
-
Type:
System::String^
The string to generate a valid identifier for.
CreateValidIdentifier tests whether the identifier conflicts with reserved or language keywords, and returns a valid identifier name that does not conflict. The returned identifier will contain the same value but, if it conflicts with reserved or language keywords, will have escape code formatting added to differentiate the identifier from the keyword. Typically, if the value needs modification, value is returned preceded by an underscore "_".
SecurityAction::LinkDemandSecurityAction::InheritanceDemand
for full trust for the immediate caller. This member cannot be used by partially trusted code.
for full trust for inheritors. This member cannot be inherited by partially trusted code.
.NET Framework
Available since 1.1
Available since 1.1
Show: