Fork me on GitHub

01|02|03| ====> (01,02,03)用于in id数组这种查询方式

//01|02|03| ====> (01,02,03)
string s = "(";
for (int i = 0; i < countryid.Split('|').Length; i++)
{
if (i > 0 && i < countryid.Split('|').Length-1)
{
s += ",";
}
s +=countryid.Split('|')[i];
}
s += ")";

string.Format(" CountryID in {0} ", s)

posted @ 2013-05-09 18:03  思考的大腿  阅读(147)  评论(0编辑  收藏  举报