Question #316063

Write a C# program that displays the current directory and then and size of all files are stored in the directory. Your display should be aesthetically pleasing. Numbers should be number aligned and matted with a separator. Provide headings over the column listings.

Expert's answer

    class Program
    {
        static void Main(string[] args)
        {
            string[] files = Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory);
            foreach (string file in files)
            {
                Console.WriteLine(file);
            }
            Console.ReadKey();
        }
    }
LATEST TUTORIALS
APPROVED BY CLIENTS