ZennoLab Assemblies Documentation
GlobalVariables Property
See Also  Example Send Feedback
ZennoLab.InterfacesLibrary Assembly > ZennoLab.InterfacesLibrary.ProjectModel Namespace > IZennoPosterProjectModel Interface : GlobalVariables Property

Glossary Item Box

Get a collection of global variables that can be accessed by namespace and name.

Syntax

C# 
IGlobalVariables GlobalVariables {get;}

Property Value

Type: ZennoLab.InterfacesLibrary.ProjectModel.Collections.IGlobalVariables

A collection of global variables.

Example

The following example uses GlobalVariables property of "project" for getting and setting value of global variable, also create a new global variable.
C#Copy Code
// get global variable by namespace and name
// variable "gv" object of interface IGlobalVariable
IGlobalVariable gv = project.GlobalVariables["MyNamespase", "VariableName"];
 
// change value of global variable
gv.Value = "ChangedValue";
 
// create a new global variable and set value
project.GlobalVariables.SetVariable("MyNamespase", "NewVariableName", "NewValue");
PHPCopy Code
// get global variable by namespace and name
// variable "gv" object of interface IGlobalVariable
$gv = $project->GlobalVariables->get_Item("MyNamespase", "VariableName");
 
// change value of global variable
$gv->Value = "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

© 2013 All Rights Reserved.