ZennoLab Assemblies Documentation
SetVariable Method
Example 
Type: http://msdn.microsoft.com/en-us/library/system.string.aspx :

The namespace of global variable.

Type: http://msdn.microsoft.com/en-us/library/system.string.aspx :

The name of global variable.

Type: http://msdn.microsoft.com/en-us/library/system.object.aspx :

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: http://msdn.microsoft.com/en-us/library/system.string.aspx :

The namespace of global variable.

variableName
Type: http://msdn.microsoft.com/en-us/library/system.string.aspx :

The name of global variable.

value
Type: http://msdn.microsoft.com/en-us/library/system.object.aspx :

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: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows Seven

See Also

Reference

IGlobalVariables Interface
IGlobalVariables Members

Send Feedback