【发布时间】:2012-07-12 04:21:38
【问题描述】:
string line = textBox1.Text.ToString();
string[] words = line.Split();
foreach (string word in words)
{
if (word.Contains("ඉ"))
{
SoundPlayer sndplayr = new SoundPlayer(WindowsFormsApplication1.Properties.Resources._a);
sndplayr.Play();
}
if (word.Contains("අ"))
{
SoundPlayer sndplayr = new SoundPlayer(WindowsFormsApplication1.Properties.Resources.la);
sndplayr.Play();
}
}
}
}
我用过这个,但它只播放文本框最后一个字符的音频。我也想播放其他字符。那我该怎么办。请帮帮我…………
【问题讨论】:
标签: c# c#-4.0 audio media-player multimedia