LinQ WHERE string.Contains or string.IndexOf?

后端 未结 4 409
暗喜
暗喜 2020-12-06 14:35

I need to write something that would give the same result as:

var result = collection.Where( o => o.Name.IndexOf( \"some_string2\" ) != -1 || o.Name.Index         


        
4条回答
  •  我在风中等你
    2020-12-06 15:07

    You are checking the collections element o.ToLower() i assume you must check for its name o.Name.ToLower().

提交回复
热议问题