/// <summary> /// Plays the given system sound. /// </summary> /// <param name="sound"></param> public static void PlaySound(SystemSound sound) { switch (sound) { case SystemSound.Error: PlaySound("SystemHand"); break; case SystemSound.SystemExit: PlaySound("SystemExit"); break; case SystemSound.SystemStart: PlaySound("SystemStart"); break; case SystemSound.Beep: PlaySound("SystemDefault"); break; case SystemSound.Warning: PlaySound("SystemExclamation"); break; case SystemSound.Question: PlaySound("SystemQuestion"); break; default: throw new NotSupportedException(string.Format("Cannot handle '{0}' ({1}).", sound, sound.GetType())); } }