I have a C# program that in the config file the user can specify Windows sounds to be played as a part of their routine. I have the sound in a variable "parameter" and it will have like "asterisk", "hand", "question", etc. In Java when I make Minecraft plugins, the enums have a .valueOf which I can pass a string and if that string matches one of the enum names, it returns it. I did System.Media.SystemSounds. and looked at what came up. There is no similar function (which I guess is expected, as it's not an enum I assume).
Is there a way to easily convert my string name into the matching SystemSound? I mean, I can switch on the string.ToLower() and make it that way but I'm hoping there is a one liner way.
Thanks!