string a = "abcdefg"; string b = "abc"; if(a.IndexOf(b)>-1) { 字符串A包含字符串B; } 转载于:https://www.cnblogs.com/visibleisfalse/p/3543069.html