Yet another way to play sounds

Posted Friday, August 19, 2005 8:01 AM by C-Dog's .NET Tip of the Day
Well I found another class for playing sounds yesterday.  The SoundPlayer class in the System.Media namespace can be used to play sounds asyncronously and syncronously.  Playing the sound is simple, simply initialize the class with the filename in the constructor or you can use the Load method if the class is already instantiated.  Then simply call the Play method. 
Here is an example.
// load the sound
SoundPlayer soundPlayer = new SoundPlayer(soundPath);

// play the sound

Read the complete post at