ZennoLab.InterfacesLibrary Assembly > ZennoLab.InterfacesLibrary.ProjectModel Namespace : ILocalVariable Interface |
public interface ILocalVariable
// 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));
Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.