TryGetArg

Load an argument and parse it into a C# variable type

public bool TryGetArg<T>(string argName, out T& value);
argName
string required
value
System.Object& required
bool
using System;
public class CPHInline
{
    public bool Execute()
    {
        //OptionA
        CPH.TryGetArg<string>("userName",out string userName); 
        //OptionB
        //Check whether userId argument exists directly as TryGetArg returns boolean        if( CPH.TryGetArg("userId",out string userId) )         {
            //Do things if userId existed
            string test = "UserId:" + userId;
        }

        return true;
    }
}