Get the global variable by the specified pair, namespace and name.
| C# | |
|---|---|
IGlobalVariable this[ string nameSpace, string variableName ]; {get;} | |
Parameters
- nameSpace
- Type: System.String
The namespace of global variable.
- variableName
- Type: System.String
The name of global variable.
Property Value
Type: ZennoLab.InterfacesLibrary.ProjectModel.IGlovalVariableThe object of IGlobalVariable describing global variable.
| Exception | Description |
|---|---|
| KeyNotFoundException | The exception that is thrown when the pair, namespace and name, specified for accessing a global variable in a collection does not match any pair in the collection. |
This property uses only for getting necessary global variable. For setting value need use method SetVariable.
The following example uses property "Item" (operator []) to access a global variable with namespace "MyNamespace" and name "MyGlobalVariable".
| C# | Copy Code |
|---|---|
IGlobalVariable gv = project.GlobalVariables["MyNamespace", "MyGlobalVariable"]; | |
| PHP | Copy Code |
|---|---|
$gv = $project->GlobalVariables->get_Item("MyNamespace", "MyGlobalVariable"); | |
Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows Seven