Answer to Question #316063 in C# for Kayla

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.

1
Expert's answer
2022-03-22T15:21:41-0400
    class Program
    {
        static void Main(string[] args)
        {
            string[] files = Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory);
            foreach (string file in files)
            {
                Console.WriteLine(file);
            }
            Console.ReadKey();
        }
    }

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS