Question: Please help me write this program in C# You have a program called ListFilesInDirectory. It takes one input that is a directory path. I want

Please help me write this program in C#

You have a program called ListFilesInDirectory. It takes one input that is a directory path. I want to be able to call this code like this: ListFilesInDirectory c:\some andom\path

Given the directory as an input, I want the program to print to screen all the names of all the files and directories in that directory and all its children.

You have the following pre-written code to work with:

Directory.List(string path) returns a list of file system objects that are direct children of the given path.

Each file system object has a .Type and .Name value.

.Type is either "file" or "directory".

.Name is the full path of the file or directory.

Please Help me out, explanations helps a ton too.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!