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

Glossary Item Box

Represents the data of the local variable.

Syntax

C# 
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.
C#Copy Code
// 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));
PHPCopy Code
// 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: 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.