IsConstant Property

Indicates whether or not the variable is defined as constant. Constant variables cannot be changed post creation.

Syntax

Property IsConstant As Boolean

Parameters

None

Examples

IronPython

#Get variable constant flag
is_constant = Host.ScriptData.Variable[varName].IsConstant

#Set variable constant flag
Host.ScriptData.Variable[varName].IsConstant = True


C#

//Get variable constant flag
bool is_constant = ScriptData.Variables[varName].IsConstant;


//Set variable constant flag 

ScriptData.Variables[varName].IsConstant = true;

Remarks