المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : ObjectDisposedException within a while loop?



C# Programming
08-21-2009, 04:04 PM
I have this method that accepts a ZipFile as a parameter and does some work etc, but after looping within a while loop, the parameter (ZipFile) is disposed... I will show a quick example instead of the original code because it would be unnecessarily complex.

private byte[] GetImage(ZipFile originalZipFile, string pass)
{
while(true) // Here is a condition that loops for some time, according to a specified number
{
ZipFile zipFile = originalZipFile //<span class="code-comment">