{
ClsFolderNFileCollection objDirAndFileCollection = new ClsFolderNFileCollection();
string[] Files;
try
{
Files = Directory.GetFileSystemEntries(Src);
foreach (string Element in Files)
{
// Sub directories
if (Directory.Exists(Element))
{
objDirAndFileCollection.FolderCollection.Add(Element);
GetCollectionOfRecursiveDirAndFiles(Element, Elements);
}
else
{
objDirAndFileCollection.FileCollection.Add(Element);
}
}
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
return objDirAndFileCollection;
}
}
// Return Class
public class ClsFolderNFileCollection
{
public List
public List
}
No comments:
Post a Comment