This documentation is archived and is not being maintained.

IVsaEngine.IsValidIdentifier Method

Checks whether the supplied identifier is valid for the script engine.

[Visual Basic]
Function IsValidIdentifier( _
   ByVal identifier As String _
) As Boolean
bool IsValidIdentifier(
   string identifier
bool IsValidIdentifier(
   String* identifier
function IsValidIdentifier(
   identifier : String
) : Boolean;


A string value provided as identifier.

Return Value

Returns true if the identifier is valid; otherwise, it returns false.


This method should be called to check the validity of identifiers before making any calls to the IVsaItems.CreateItem method, and should also be used when adding code items using the methods of the IVsaCodeItem interface.

The following table shows the exceptions that the IsValidIdentifier method can throw.

Exception Type Condition
EngineClosed The IVsaEngine.Close method has been called and the engine is closed.
EngineBusy The engine is currently executing code for another thread.
EngineNotInitialized The engine has not been initialized.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

IVsaEngine Interface | IVsaEngine Members | Microsoft.Vsa Namespace | IVsaCodeItem