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();
}
}
}
}
我用过这个,但它只播放文本框最后一个字符的音频。我也想播放其他字符。那我该怎么办。请帮我............