C#判断字符串A是否包含字符串B--by winter

string a = "abcdefg";

string b = "abc";

if(a.IndexOf(b)>-1)

{

   字符串A包含字符串B;

}

posted @ 2014-02-10 16:00  VisibleIsFalse  阅读(2396)  评论(0编辑  收藏  举报