foreach - C# - Find specific folders -


i'd directories specific file names:

foreach (string subdirtrans in directory.getdirectories(path)) 

for instance getdirectories path/dir1, path/dir2 etc.

is possible?

you can use code:

 var names = new string[] { "dir1", "dir2" };     var directories = system.io.directory.getdirectories("path", "*", system.io.searchoption.alldirectories)         .where(d => names.contains(system.io.path.getfilename(d)))         .tolist(); 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -