TryGetValue method

bool TryGetValue(
  1. ImAddressKey key,
  2. OutParam<String> imAddressOutParam
)
Tries to get the IM address associated with the specified key. The key. When this method returns, contains the IM address associated with the specified key, if the key is found; otherwise, null. This parameter is passed uninitialized.

Implementation

bool TryGetValue(ImAddressKey key, OutParam<String> imAddressOutParam) {
  ImAddressEntry? entry = null;

  if (this.Entries.containsKey(key)) {
    entry = this.Entries[key];
    imAddressOutParam.param = entry!.ImAddress;

    return true;
  } else {
    imAddressOutParam.param = null;

    return false;
  }
}