Tuesday, January 31, 2012

C# - Listando Arquivos na Pasta

using System.IO;
...
...
DirectoryInfo di = new DirectoryInfo(Environment.CurrentDirectory );
            FileInfo[] rgFiles = di.GetFiles("*.pdf");
            foreach (FileInfo fi in rgFiles)
            {
                   console.Write(fi.Name);
            }

No comments: