I’m using a custom class to store information about files found in a directory based upon a regex, and I need to return these filelists from a method. Here’s some psuedocode of how it’s currently working:
class FileList {
//propertes of the file here, such as regex name, source folder and whether it needs to be deleted after copying
}
..
..
foreach (file in directory that matches regex)
{
new filelist
//Set all the properties
}
return allfilelists;
But how do I return the all the lists, or is there a better way of doing this?
Thanks
Why not return a list of FileLists?