是否有一些实用程序可以检查序列是否包含多个元素而不是Contains
重复使用?
List<string> containter = new List<string>();
for (int i = 0; i < 10; i++)
{
containter.Add("string #" + i);
}
if (containter.Contains("string #2") && //Is it possible to replace this with one call passing two strings to improve efficiency
containter.Contains("string #6"))
{
//Do Something
}