ICodeGenerator::IsValidIdentifier Method (String^)

 

Gets a value that indicates whether the specified value is a valid identifier for the current language.

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

[PermissionSetAttribute(SecurityAction::LinkDemand, Name = "FullTrust")]
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = "FullTrust")]
bool IsValidIdentifier(
	String^ value
)

Parameters

value
Type: System::String^

The value to test for being a valid identifier.

Return Value

Type: System::Boolean

true if the value parameter is a valid identifier; otherwise, false.

This method tests whether an identifier is valid. When implementing IsValidIdentifier in a derived class, design the method to test the value passed to it, and return true only if the value fits the rules of the language and does not conflict with a keyword.

SecurityAction::LinkDemand

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

SecurityAction::InheritanceDemand

for full trust for inheritors. This member cannot be inherited by partially trusted code.

.NET Framework
Available since 1.1
Return to top
Show: