Extracting file names from directory

Z

Zach

Is there a way to extract the names of the files, present in a directory,
and add them to an array?

Thanks,
Zach.
 
A

Arne Vajhøj

Is there a way to extract the names of the files, present in a
directory, and add them to an array?

Directory.GetFiles gets an array with filenames.

It should not be a problem combining an existing
array with that array (but using a List<string> would
be a lot more elegant).

Arne
 
Z

Zach

Arne Vajhøj said:
Directory.GetFiles gets an array with filenames.

It should not be a problem combining an existing
array with that array (but using a List<string> would
be a lot more elegant).

Arne

Yes it would be.

Zach.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top