How to play sound in C# without knowing the sound's location... And also how to send them for some dudeš
So this was someone's suggestion and I followed that guy's lead. Add music file into Solution Project -> Add Existing Item... -> Add your .wav file. 1.Set the file to Copy always 2.Click the music file in Solution Explorer. 3.In the Properties panel, set Copy to Output Directory to Copy always. 4.Also, set Build Action to Content. This will make Visual Studio always copying the music file into the output directory (e.g. Debug folder). Use this code using System.Media; SoundPlayer player = new SoundPlayer(); player.SoundLocation = AppDomain.CurrentDomain.BaseDirectory + "\\yourmusic.wav"; player.Play(); šthe code is Super good But here is the problem: I need to send the project for someone. I still have to send the music file for him.don't I?...and the problem is that I don't know how to send him the music file... should I just send him the //myProject.exe and the music file one by one, Plane and sample? Or should I put them in some special file or in some special format?š