I would like to play a different sound based on the value of a variable. I could do independent IF statements but I'd like to do it in an array. I have a global
SystemSound[] sound_array=new SystemSound[5];
and in form.load I do
sound_array[0] = SystemSounds.Beep;
sound_array[1] = SystemSounds.Asterisk;
sound_array[2] = SystemSounds.Exclamation;
sound_array[3] = SystemSounds.Hand;
sound_array[4] = SystemSounds.Question;
then in the main code I have
SystemSounds.sound_array[i].Play();
if I do SystemSounds.beep.Play();
it works fine, I just can't figure out how to do it in an array. I get Error 1 'System.Media.SystemSounds' does not contain a definition for 'sound_array' Thanks