I have an object that has a byte array property 'ZipFile' to store a file stream:
Property in Result class:
public class Result
{
public byte[] ZipFile;
}
In my application, I generate a PDF file, and read the file into the 'ZipFile' property using my ReadFile method like this :
objResult.ZipFile = ReadFile(FilePath);
Signature of ReadFile method:
private byte[] ReadFile(string strFileName)
The Problem:
My ReadFile method will now be called in a loop, because I am generating multiple PDF files. Each time the ReadFile method will read a new file from the specifed parameter to the 'objResult.ZipFile' property, consequently replacing the old value in 'ZipFile' property. Now, I want my 'ZipFile' property to store multiple PDF files stream. So what should I do for that? Should I just change this property to a two dimensional byte[][] array, or is there any better way to do this? Remember, that this property will be used for saving(writing) these files by calling method. Open to all Suggestions. Thanks.