TryGetValue method

bool TryGetValue(
  1. EmailAddressKey key,
  2. OutParam<EmailAddress> emailAddressOutParam
)
Tries to get the e-mail address associated with the specified key. The key. When this method returns, contains the e-mail address associated with the specified key, if the key is found; otherwise, null. This parameter is passed uninitialized.

Implementation

bool TryGetValue(
    EmailAddressKey key, OutParam<EmailAddress> emailAddressOutParam) {
  if (this.Entries.containsKey(key)) {
    emailAddressOutParam.param = this.Entries[key]!.EmailAddress;
    return true;
  } else {
    emailAddressOutParam.param = null;
    return false;
  }
}