Esempio n. 1
0
        void SetValueOfReference(T value)
        {
            GenericVariable <T> refObj = GenericVariable <T> .GetAsType(Variable);

            if (refObj != null)
            {
                refObj.Value = value;
            }
        }
Esempio n. 2
0
        T GetValueFromReference()
        {
            GenericVariable <T> refObj = GenericVariable <T> .GetAsType(Variable);

            if (refObj != null)
            {
                //if (refObj.Value)
                try
                {
                    return((T)refObj.Value);
                }
                catch
                {
                    return(default(T));
                }
            }

            else
            {
                return(default(T));
            }
        }