here is the code :
// Files has 25 PDF
var Files = Folder.GetFileToPublicFolder(Folder.srcFolder);
foreach (FileInfo file in Files)
{
// Get 10 PDF in Files
List<FileInfo> files = Files.Take(10).ToList();
// Process the 10 PDF
foreach (var item in files)
{
File.Move(Path.Combine(Folder.srcFolder, item.Name), Path.Combine(Folder.tmpFolder, item.Name));
}
files = null;
ProcessParallelThread(e);
}
I have Public Folder that has 25 PDF Files.
Using this
List<FileInfo> files = Files.Take(10).ToList();
it will get the 1 - 10 PDF and processed it. After processing the 1 - 10 PDF when foreach loops again it take the same 1 - 10 PDF not the 11 - 20 PDF.
How can i get the Other PDF in List<>?
Thank you in Advance!