j'aimerais lire un son en c#.
Je développe avec Visual Studio 2008.
Mon bout de code pour lire le son est le suivant:
System.Media.SoundPlayer s = new System.Media.SoundPlayer();
// Set the location of the wav file to play
s.SoundLocation = @"\C:\Users\Desktop\numeros\005.wav";
// Play looping
s.PlayLooping();
// Play normal
s.Play();
Lorsque je lance mon application je n'ai pas d'erreur pour le construire, mais dès que je l'utilise le son ne se lance pas et j'ai le message d'erreur :
"could not find a part of the path" qui s'affiche.
Quelqu'un peut-il m'aider s'il vous plaît .
Merci
System.Media.SoundPlayer s = new System.Media.SoundPlayer();
// Set the location of the wav file to play
s.SoundLocation = "C:\\Users_\Desktop\\numeros\005.wav";
// Play looping
s.PlayLooping();
// Play normal
s.Play();