1
我在数组中有一些单词,并且想要播放网站主机上的一些相关文件(这些文件的名称与数组中的字符串的名称相同)。我想用axWindowsMediaPlayer播放每个音频。但是当我在foreach循环中使用它时,它只会播放最后一个,因为它没有任何中断。我该如何解决这个问题?如何播放音频在c#中的axWindowsMediaPlayer?
string[] fileNames = textBox2.Text.ToLower().Split();
foreach (string words in fileNames)
{
axWindowsMediaPlayer1.URL = ("http://the website address/" + words + ".mp3");
}
我使用Visual Studio 2010(c#)windows应用程序。