简单的代码如下:

public static string[] GetProductList(string inputstring)
        {
            char[] split = { ',', ' ', ';', ';', ',', ':', ':', (char)10, (char)13 };
            return inputstring.Split(split, StringSplitOptions.RemoveEmptyEntries);
        }

获取sql in 部分的代码:

public static string GetSQLInPartByProductlist(string[] productlist)
        {
            string inpartsql = " in  (";
            string endpart = ")";

foreach (string item in productlist)
            {
                inpartsql += "'" + item + "'," + " ";
            }
            inpartsql = inpartsql.Remove(inpartsql.Length - 2);
            inpartsql += endpart;
            return inpartsql;

}

测试的界面

最新文章

  1. 智能指针unique_ptr的用法
  2. Hello 2017!
  3. js调用浏览器打印
  4. windows 文件权限导致的 git 问题
  5. String类和StringBuffer类的方法
  6. mvc无法找到资源
  7. jquery 操作 checkbox
  8. 自制获取data-自定义属性
  9. Cows(poj 2481 树状数组)
  10. 段(SEGMENT)
  11. shell 中test命令
  12. 【Python使用】使用pip安装卸载Python包(含离线安装Python包)未完成???
  13. [20170628]完善ooerr脚本.txt
  14. ]remove-duplicates-from-sorted-list-ii (删除)
  15. mysql数据库建立的数据库在哪个文件夹?
  16. python复习冒泡排序
  17. linux dns
  18. 使用React改版网站
  19. 回调函数callback使用例子
  20. java强软弱虚引用详解(转载)

热门文章

  1. Windows 平台安装 MongoDB
  2. Oracle性能诊断艺术-相关脚本说明
  3. Leetcode 113
  4. OAF中多语言的实现(转)
  5. java反编译工具eclipse插件jad的使用
  6. PHP:第四章——PHP数组array_diff计算数组差集
  7. HDU 1940
  8. node安装问题
  9. Spring Data操作Redis时,发现key值出现 \xac\xed\x00\x05t\x00\tb
  10. L236