Gets or sets value of global variable.
Syntax
Property Value
Type: dynamic
The value of global variable.
Example
The following example demonstrates using
Value property.
In this example value of global variable cast to System.Object. But it's not necessary, because Value property is dynamic and can be any type.
| C# | Copy Code |
|---|
// get global variable
IGlobalVariable gv = project.GlobalVariables["MyNamespace", "MyGlobalVariable"];
// get value of global variable
object value = gv.Value;
// set value of global variable
gv.Value = 0; |
| PHP | Copy Code |
|---|
// get global variable
$gv = $project->GlobalVariables->get_Item("MyNamespace", "MyGlobalVariable");
// get value of global variable
$value = $gv->Value;
// set value of global variable
$gv->Value = 0; |
Requirements
Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows Seven
See Also