C#判断字符串A是否包含字符串B--by winter string a = "abcdefg"; string b = "abc"; if(a.IndexOf(b)>-1) { 字符串A包含字符串B; }