[C#]获取当前文件夹下所有文件全路径

using System;
using System.IO;

namespace SairenjiHaruna
{
    class Program
    {
        static void Main(string[] args)
        {
            string strCurPath = System.Environment.CurrentDirectory;
            string[] strFileCurPath = Directory.GetFiles(strCurPath);
            foreach (string strPath in strFileCurPath)
            {
                Console.WriteLine(strPath);
            }
            Console.ReadKey();
        }
    }
}

 

posted @ 2022-10-21 10:01  SairenjiHaruna  阅读(160)  评论(0编辑  收藏  举报