ZennoLab Assemblies Documentation
SetVariable Method
Example 
Type: System.String

The namespace of global variable.

Type: System.String

The name of global variable.

Type: System.Object

The name of global variable.

Sets value or create a new global variable by the specified pair, namespace and name.
Syntax
void SetVariable( 
   string nameSpace,
   string variableName,
   object value
)

Parameters

nameSpace
Type: System.String

The namespace of global variable.

variableName
Type: System.String

The name of global variable.

value
Type: System.Object

The name of global variable.

Remarks
If collection is not contains global variable with specified namespace and name, then a new global variable will be created and added to collection with the specified value.
Example
// change a value of existing global variable
project.GlobalVariables.SetVariable("MyNamespase", "ExistingVariableName", "ChangedValue");
 
// create a new global variable and set value
project.GlobalVariables.SetVariable("MyNamespase", "NewVariableName", "NewValue");
// change a value of existing global variable
$project->GlobalVariables->SetVariable("MyNamespase", "ExistingVariableName", "ChangedValue");
 
// create a new global variable and set value
$project->GlobalVariables->SetVariable("MyNamespase", "NewVariableName", "NewValue");
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

IGlobalVariables Interface
IGlobalVariables Members

Send Feedback