我写了一个代码:
string strSearch = textBox1.Text;
XDocument xdoc;
List<string> lstItemsForAdd;
lstItemsForAdd = xdoc.Descendants("name")
.Where(item => item.Value.Contains(strSearch))
.Select(item => item.Value)
.Take(5)
.OrderBy(item => item)
.ToList();
现在这段代码对查找的大小写敏感......
我怎么能在不敏感大小写的情况下进行搜索,
但我不想将项目和 strSearch 转换为小写/大写字符
,所以我该怎么做做 ?
谢谢和亲切的问候。