Reputation: 632
Is there a way to include an audio file, like the images can be done, into the output exe file in .NET ? c#
I've been looking around and wow, this apparently isn't used that much?
Upvotes: 0
Views: 419
Reputation: 310
Add your file to the resources of the assembly.
Now you can play it like this (provided that I named the resource as MyWavResource):
System.Media.SoundPlayer player = new System.Media.SoundPlayer(Properties.Resources.MyWavResouce);
player.Play();
Upvotes: 2