Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'System.IO.Directory' does not contain a definition for 'EnumerateFiles'

Tags:

c#

.net

habe a problem, I developed a program with .NET 4 Framework but I have to switch to 3.5 (VS 2008) - but in 3.5 is EnumerateFiles not included. What I can use for this ?

I use it here:

var txtFiles = Directory.EnumerateFiles(folder_pfad, "*.txt", SearchOption.TopDirectoryOnly);

Thanks.

like image 801
Marv Avatar asked May 16 '13 18:05

Marv


1 Answers

I think this will work...

s = Directory.GetFiles(folder_pfad, "*.txt", SearchOption.TopDirectoryOnly);
like image 109
Kevin Avatar answered Sep 21 '22 18:09

Kevin