TryGetValue method

bool TryGetValue(
  1. Object key,
  2. OutParam<Object> value
)
Gets the value associated with the specified key. The key whose value to get. When this method returns, the value associated with the specified key, if the key is found; otherwise, null.

Implementation

bool TryGetValue(Object key, OutParam<Object> value) {
  if (_dictionary.containsKey(key)) {
    value.param = _dictionary[key];
    return true;
  }
  value.param = null;
  return false;
}