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");
누구든지 C # .net에서 이것을 구현하는 방법을 알려주세요?
2
나는 항상 MSDN 방법을 선호했습니다. 이 링크 의 맨 아래 에는 콘솔 프로그램 (C #)이 포함 된 재귀 예제가 있습니다.
—
Justin
@Panuvin-참고 : MSDN 코드는 약간 위험합니다. 매우 큰 폴더 및 하위 폴더 콘텐츠 (많은 파일)의 경우 StackOverflow 예외가 발생할 수 있습니다 (재귀 코드로 인해)
—
Joezer