using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main()
{
List<string> list = new List<string> { "ABC", "DEF", "GHI" };
string searchTerm = "AB";
bool contains = list.Any(s => s.Contains(searchTerm));
Console.WriteLine(contains); // 输出: True
}
}
08-08
1723
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-16
767
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)