public T GetGlobalVar<T>(string varName, bool persisted = true)
The string name of the global variable
True
To get, set, or unset persisted global variables, set to true or leave empty.
To get, set, or unset temporary/non-persisted global variables, set to false.
T
using System;
public class CPHInline
{
public bool Execute()
{
//Examples on usage
//Get integer number from persisted global variable
int myInt = CPH.GetGlobalVar<int>("myInt");
//Get string/text from persisted global variable
string myString = CPH.GetGlobalVar<string>("myString",true);
//Get string/text from non-persisted global variable
string myString = CPH.GetGlobalVar<string>("myString",false);
return true;
}
}