问题描述
- c#在用winfrom时 怎样实现模糊搜索
- void LoadLrc()
{
string songPath=listSongs[listBox1.SelectedIndex];
string[] songPath1 = songPath.Split(new char []{'.'} StringSplitOptions.RemoveEmptyEntries);
string void LoadLrc()
{
string songPath=listSongs[listBox1.SelectedIndex];
string[] songPath1 = songPath.Split(new char []{'.'} StringSplitOptions.RemoveEmptyEntries);
string songPath2=;
if (File.Exists(songPath2))
{
string []lrcText = File.ReadAllLines(songPath Encoding .Default );
FormatLrc(lrcText);
}
else
{
lblLrc.Text = ""-------------歌词未找到-------------"";
}
}=;
if (File.Exists(songPath2))
{
string []lrcText = File.ReadAllLines(songPath Encoding .Default );
FormatLrc(lrcText);
}
else
{
lblLrc.Text = ""-------------歌词未找到-------------"";
}
}我想让 songPath2 的搜索结果为 ****songPath1【0】****.lrc 该怎么写呀 谢谢
解决方案
string[] files = Directory.GetFiles(目录*关键字*.lrc"");if (files.Count() > 0)...
时间: 2024-08-25 11:29:36