string a="china"; string b="i"; if (a.IndexOf(b) > -1) { //包含指定的字符串,执行相应的代码 }