我
List<string> words = new List<string> {"word1", "word2", "word3"};
And i want to check using linq if my string contains ANY of these words; Smthng like:
var q = myText.ContainsAny(words);
And the second, if i have a list of sentences too:
List<string> sentences = new List<string> { "sentence1 word1" , "sentence2 word2" , "sentence3 word3"};
并且如果这些句子中有任何一句话,也包含其中的任何内容。
var q = sentences.Where(s=>words.Any(s.text))....