Having “key is a directory name” exception

Question:


so using dir.GetFiles(), i can’t get the files inside the directory.
how can i solve this????

Answer:

Instead of above code use this below code it will work. The change is trailing slash.

Leave a Reply