IVsaEngine.IsValidIdentifier Method
Checks whether the supplied identifier is valid for the script engine.
public: bool IsValidIdentifier(
String* identifier
);
public bool IsValidIdentifier(
string identifier
);
MustOverride Public Function IsValidIdentifier( _
ByVal identifier As String _
) As Boolean
Return Value
Returns true if the identifier is valid; otherwise, it returns false.
Parameters
- identifier
A string value provided as identifier.
Remarks
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. |