UnsetGlobalVar
Remove a global variable by name
Signature
public void UnsetGlobalVar(string varName, bool persisted = true)
Parameters
varName
string required
The string name of the global variable
persisted
bool
Default:
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.
Return Type
void
Example
using System;
public class CPHInline
{
public bool Execute()
{
//Please be extremely careful with this method
//Only possible to restore with back-up
//Unset persisted global variable "myString"
CPH.UnsetGlobalVar("myString"); CPH.UnsetGlobalVar("myString", true);
//Unset non-persisted global variable "myString"
CPH.UnsetGlobalVar("myString", false);
return true;
}
}