DefinitionType Property

The creation type of a variable, either static (created before script execution) or dynamic (created during script execution).

Syntax

Property DefinitionType As VSVariableDefinitionType

Parameters

None

Examples

IronPython

#Get variable definition type (static, dynamic)
def_type = Host.ScriptData.Variable[varName].DefinitionType

#Set variable definition type (static, dynamic)
Host.ScriptData.Variable[varName].DefinitionType = VSVariableDefinitionType.VSStatic


C#

//Get variable definition type (static, dynamic)
VSVariableDefinitionType def_type = ScriptData.Variables[varName].DefinitionType;


//Set variable definition type (static, dynamic) 

ScriptData.Variables[varName].DefinitionType = VSVariableDefinitionType.VSStatic;

Remarks