How to read file name with dll extension from a directory and from its subfolders recursively using LINQ or LAMBDA expression.
Now i’m using Nested for-each loop to do this.
Is there any way to do this using LINQ or LAMBDA expression?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You don’t need to use LINQ to do this – it’s built into the framework:
or if you’re using .NET 4:
To be honest, LINQ isn’t great in terms of recursion. You’d probably want to write your own general-purpose recursive extension method. Given how often this sort of question is asked, I should really do that myself some time…