很简单,就是一个函数, IndexOf(),代码如下string str1 = @"abcdefghijklmn";string str2 = @"ad";if (str1.IndexOf(str2) >= 0){this.textBox1.Text = "ok";}