• λ我爱Aspx >> Asp.Net >> 超级简单的问题~遍历文件
  • 超级简单的问题~遍历文件

  • :aspxer  Դ:csdn  :2007-7-6 2:51:35  ؼ:
  • StringBuilder sbd = new StringBuilder();

    foreach (string s in fileList)

    {

    sbd.AppendLine(s);

    }

    this.txtResult.Text = sbd.ToString();

    }

    private void GetList(string path, List<string> fileList)

    {

    string[] dir;

    try

    {

    dir = Directory.GetDirectories(path);

    }

    catch

    {

    return;

    }

    foreach (string d in dir)

    {

    GetList(d, fileList);

    }

    dir = Directory.GetFiles(path);

    foreach (string f in dir)

    {

    if (f.Substring(f.LastIndexOf(".")).Equals(".cs"))

    {

    fileList.Add(f);

    }

    }

    }

    第6楼. 由 AloneSword 于 2007-7-1 21:33:53 发表

    lxcnn(过客) (

    比较中肯。

    正解

    第7楼. 由 luffy927 于 2007-7-1 21:49:16 发表

    谢了各位~结了~

    Ҷƪл˵?
  • һƪ窗口中的控件放不下了怎么办?
    һƪ字符串怎么转换成日期?