It’s fairly simple to play a sound file, say temp.wav, from Visual Studio C#. I’m looking for a way to do this without temp.wav being locatable from the machine running the program.
IE – I want to read the .WAV file into my solution so that it is somehow inside of my .EXE and be played by it.
Is this possible?
First add the .wav file as a resource: Project + Properties, Resources tab, click on the arrow of “Add Resource”, Add Existing File and navigate to your wav. Let’s say it is called “Beep”.
Then add code like this to play the sound: