Dictionary<string, string> dic = new Dictionary<string, string>();
dic.Add("ABCD", "1111");
dic.Add("ABCE", "2222");
dic.Add("ABCF", "3333");
dic.Add("BCDD", "4444");
var v = from d in dic where d.Key.StartsWith("ABC") select d;
string s = String.Empty;
foreach (var k in v)
{
s += k.Value + "|";
}
textBox1.Text = s;
[c#笔记]Dictionary模糊查找
最新推荐文章于 2024-08-13 22:43:50 发布