GetVariable() public method

Gets the value with the specific symbolic name.
public GetVariable ( String name ) : Value
name String /// The variable's name. ///
return Value
コード例 #1
0
        /// <summary>
        /// Gets the value with the specific symbolic name.
        /// </summary>
        /// <param name="name">
        /// The variable's name.
        /// </param>
        /// <returns>The value of the variable or null.</returns>
        public Value GetVariable(String name)
        {
            if (_variables.ContainsKey(name))
            {
                return(_variables[name] as Value);
            }

            if (_parent != null)
            {
                return(_parent.GetVariable(name));
            }

            return(null);
        }