I want to add sound effects to my Visual C# program. What's the simplest way to do this?
This what I wrote and did not work. The sound is in Desktop and I copy also to visual studio and is didnt word. What I tried do is when I click will be sound effect
private void ShipDown(object sender, MouseButtonEventArgs e)
{
isPress = true;
using (SoundPlayer player = new SoundPlayer("Sound\\mg42.wav"))
{
player.PlaySync();
}
}