【发布时间】:2014-10-08 00:27:43
【问题描述】:
我有这个清单:
List<string> lst01 = new List<string>();
lst01.Add("1");
lst01.Add("999");
lst01.Add("888");
List<string> lst02 = new List<string>();
lst02.Add("4");
lst02.Add("5");
lst02.Add("6");
string myString = "123";
我想知道 myString 是否包含列表中的任何字符串。
因此,该方法将在第一个列表中返回 true,而在第二个列表中返回 false。
非常感谢。
【问题讨论】: