//容易,用String类的Contains方法就可以判断,具体看例子。
using System;
public class Test
{
public static void Main(string[] args)
{
string line="aaa 你好 哈哈哈 对了 good bye just so so so easy!";
string[] strs={"aaa","sos","哈哈哈","对了吗","so easy"};
foreach(string s in strs)
{
if(line.Contains(s))
{
Console.WriteLine("字符串\""+line+"\"包含字符串\""+s+"\"");
}
else
{
Console.WriteLine("字符串\""+line+"\"不包含字符串\""+s+"\"");
}
}
Console.Write("Press any key to continue . . . ");
Console.ReadLine();
}
}