0
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更低/高字符
所以我該怎麼辦?
感謝和親切的問候。
檢查StringComparison.OrdinalIgnoreCase – Mate 2013-02-17 05:49:59
'@ Mate'我嘗試從'StringComparison.OrdinalIgnoreCase'使用,但在此代碼不能使用!我可以用嗎 ?怎麼樣 ? – 2013-02-17 05:52:05
我已經添加了一個例子的答案。我希望這會有所幫助 – Mate 2013-02-17 06:04:16