How to loop through all the files in a directory in c # .net?

I want to get the files in folder and also in its subfolders.The following code does not get the files in its subfolder:

string[] files = Directory.GetFiles(txtFolderPath.Text, "*ProfileHandler.cs");

Can anyone Please tell me how to implement this in c# .net?

107
задан Mark Bell 23 November 2010 в 09:13
поделиться