CodeGenerator::IsValidLanguageIndependentIdentifier Method (String^)

 

Gets a value indicating whether the specified string is a valid identifier.

Namespace:   System.CodeDom.Compiler
Assembly:  System (in System.dll)

public:
static bool IsValidLanguageIndependentIdentifier(
	String^ value
)

Parameters

value
Type: System::String^

The string to test for validity.

Return Value

Type: System::Boolean

true if the specified string is a valid identifier; otherwise, false.

This method checks the specified string to ensure that it does not contain certain characters that can be used to escape an identifier field. The ValidateIdentifiers method calls this method to perform string validation. Calling the ValidateIdentifiers method and passing a CodeCompileUnit before generating code from it can prevent the use of certain character sequences to include hidden code within an identifier field.

SecurityAction::LinkDemand

for full trust for the immediate caller. This member cannot be used by partially trusted code.

.NET Framework
Available since 1.1
Return to top
Show: