Microsoft.Scripting.ScopeStorage.TryGetValue C# (CSharp) Method

TryGetValue() public method

Attempts to get the named value from the scope optionally ignoring the case. Returns true if the value is present, false if it is not.
public TryGetValue ( string name, bool ignoreCase, Object &value ) : bool
name string
ignoreCase bool
value System.Object
return bool
        public bool TryGetValue(string name, bool ignoreCase, out dynamic value) {
            if (HasVariable(name)) {
                object objValue;
                if (GetScopeVariable(name, ignoreCase).TryGetValue(out objValue)) {
                    value = objValue;
                    return true;
                }
            }

            value = null;
            return false;
        }