I have some words in an array and want to play some related files that are on a website's host.(The name of those files are as same as the string words in the array). I want to use a axWindowsMediaPlayer to play each audio. But when I use it in a foreach loop it only plays the last one, because there is not any interrupt in it. How may I fix this problem?
string[] fileNames = textBox2.Text.ToLower().Split();
foreach (string words in fileNames)
{
axWindowsMediaPlayer1.URL = ("http://the website address/" + words + ".mp3");
}
I use Visual Studio 2010 (c#) windows application.