本帖最后由 mzoy 于 2012-10-07 07:52:10 编辑

解决方案 »

  1.   

    string str = "#0||1.txt||0.00 KB||~/Upload/FileUpload20121007073636062.txt||file-0#0||2.txt||0.00 KB||~/Upload/FileUpload20121007073640375.txt||file-1";
    var query = str.Split('#', StringSplitOptions.RemoveEmptyEntries).Select(x => x.Split(new string[] { "||" }, StringSplitOptions.RemoveEmptyEntries)).Select(x => new { filename = x[1], size = x[2], path = x[3], fileid = x[4] });
    foreach (var item in query)
    {
        Response.WriteLine(item.filename);
        Response.WriteLine(item.size);
        ...
    }
      

  2.   


     char[] d = {'#'};为什么我得单独把这个提出来编译才能通过。。不过上术方法已经实现了,3q