I want to play all of mp3 from List variable but it only play the last mp3 file.
This is my code
private void button2_Click(object sender, EventArgs e)
{
List<String> voiceEN = new List<string>();
WMPLib.WindowsMediaPlayer wplayer = new WMPLib.WindowsMediaPlayer();
voiceEN = NumberToWordEN(4515);
foreach (string i in voiceEN)
{
wplayer.URL = "voicesEN\\" + i + ".mp3";
wplayer.controls.play();
Console.WriteLine("voicesEN\\" + i + ".mp3");
}
}
when I run this code it show like this in output
voicesTH\five.mp3
voicesTH\thousand.mp3
voicesTH\five.mp3
voicesTH\ten.mp3
voicesTH\1sp.mp3
But it play 1sp.mp3 only. How to play all of these mp3 .