Normally, in .NET, you need to decide between System.Media.SoundPlayer and System.Media.SystemSounds. The latter only handles 5 sounds. The former can handle any sound you provide a link to.
Now one library takes care of that for you. Just tell it what sound and it does the rest. A PowerShell module is coming to serve as a demonstration.