ZennoLab Assemblies Documentation
ILocalVariable Interface
Members  Example 
Represents the data of the local variable.
Object Model
ILocalVariable Interface
Syntax
public interface ILocalVariable 
Remarks
This interface can be used in action OwnCode (C# or PHP) of ProjectMaker.
Example
The following code using ILocalVariable Interface for getting information about local variable.
// get local variable
ILocalVariable lv = project.Variables["VariableName"];
 
// get comment for current local variable
string comment = lv.Comment;
// if value is empty then set comment for local variable
if (String.IsNullOrWhiteSpace(comment)) lv.Comment = "Set the comment for this local variable";
 
// get name of local variable
string name = lv.Name;
// get group of local variable
string @group = lv.Group.ToString();
// get value of local variable
object value = lv.Value;
 
// show message about variable
System.Windows.Forms.MessageBox.Show(String.Format("Local variable: value is {0}; comment {1}", value, comment), 
        String.Format("Information about variable {0} from group {1}", name, @group));
// get local variable
$lv = $project->Variables->get_Item("VariableName");
 
// get comment for current local variable
$comment = $lv->Comment;
// if value is empty then set comment for local variable
if (String::IsNullOrWhiteSpace($comment)) $lv->Comment = "Set the comment for this local variable";
 
// get name of local variable
$name = $lv->Name;
// get group of local variable
$group = $lv->Group->ToString();
// get value of local variable
$value = $lv->Value;
 
// show message about variable
System\Windows\Forms\MessageBox::Show(String::Format("Local variable: value is {0}; comment {1}", $value, $comment), 
        String::Format("Information about variable {0} from group {1}", $name, $group));
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

ILocalVariable Members
ZennoLab.InterfacesLibrary.ProjectModel Namespace
IGlobalVariable Interface
ILocalVariables Interface

Send Feedback