Export (0) Print
Expand All

ICodeGenerator.ValidateIdentifier Method

Throws an exception if the specified value is not a valid identifier.

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

void ValidateIdentifier (
	string value
void ValidateIdentifier (
	String value
function ValidateIdentifier (
	value : String
Not applicable.



The identifier to validate.

Exception typeCondition


The identifier is not valid.

Rather than returning a value, this method throws an exception if the specified identifier is not valid according to the method implementation. Typically, the exception is an ArgumentException. This method enables a code generator that implements this method to produce an informative error message based upon the value of an invalid identifier.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

© 2014 Microsoft