ZennoLab Assemblies Documentation
ILocalVariables Interface
Members  Example  See Also  Send Feedback
ZennoLab.InterfacesLibrary Assembly > ZennoLab.InterfacesLibrary.ProjectModel.Collections Namespace : ILocalVariables Interface

Glossary Item Box

Represents a collection of local variables that can be accessed by name.

Syntax

C# 
public interface ILocalVariables 

Remarks

This interface can be used in action OwnCode (C# or PHP) of ProjectMaker.

Example

The following example uses property Variables of "project" for getting and setting value of local variable.
C#Copy Code
// get local variable
ILocalVariable lv = project.Variables["LocalVariable"];
 
// get value
string oldValue = lv.Value;
 
// set value
lv.Value = "NewValue";
 
// get a new value
string newValue = lv.Value;
 
// return old and new value
return String.Format("Old value: {0}; New value: {1}", oldValue, newValue);
PHPCopy Code
// get local variable
$lv = $project->Variables->get_Item("LocalVariable");
 
// get value
$oldValue = $lv->Value;
 
// set value
$lv->Value = "NewValue";
 
// get a new value
$newValue = $lv->Value;
 
// return old and new value
return String::Format("Old value: {0}; New value: {1}", $oldValue, $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.