// Convert character into touch tone key enumeration private static bool TryParseKey(char key, out TouchToneKey result) { int index = ValidTouchTones.IndexOf(key); if (index > -1) { result = (TouchToneKey)index; return(true); } else { result = default(TouchToneKey); return(false); } }
// Convert character into touch tone key enumeration private static bool TryParseKey(char key, out TouchToneKey result) { int index = ValidTouchTones.IndexOf(key); if (index > -1) { result = (TouchToneKey)index; return true; } else { result = default(TouchToneKey); return false; } }
/// <summary> /// Constructs a new <see cref="TouchTone"/> for specified touch tone key. /// </summary> /// <param name="key">Touch tone to create.</param> public TouchTone(TouchToneKey key) { Key = key; Duration = DefaultKeyDuration; }