New (other) Method

Creates a new variable (other type than Datarow).

Syntax

Sub New(name, type, value, description, isConstant, varDefType)


Parameters


name

Type: String

The name of the variable


type

Type: VSVariableDataType

The name of the variable


value

Type: Object

The name of the variable


description

Type: String

The name of the variable


isConstant

Type: Boolean

The name of the variable


varDefType

Type: VSVariableDefinitionType

The name of the variable



Return Value


Type: VSVariable

Examples

IronPython

#Create variable (other type than Datarow)

var = VSVariable(varName, VSVariableDataType.String, varName + " (set by IronPython script)", varName + " (set by IronPython script)", False, VSVariableDefinitionType.VSDynamic)
Host.ScriptData.Variable[varName] = var


C#

//Create variable (other type than Datarow)

VSVariable var = new VSVariable(varName, VSVariableDataType.String, varName + " (set by C# script)", varName + " (set by C# script)", False, VSVariableDefinitionType.VSDynamic);
ScriptData.set_Variable(varName, var);

Remarks