all groups > dotnet compact framework > june 2006 >
You're in the

dotnet compact framework

group:

ObjectDisposedException


Re: ObjectDisposedException ctacke/
6/29/2006 12:03:26 PM
dotnet compact framework:
Try a little punctuation - I'm really not sure what you're saying or asking.

-Chris



[quoted text, click to view]

ObjectDisposedException HW
6/29/2006 4:52:15 PM
Hi, I'm seeing an ObjectDisposedException inside the Watch variable
of my FileStream object, the code is here dead simple when i Close the
Filestream object it doesn't get set to Nothing although the BinaryReader
object does get set to Nothing, what's wrong?

Dim FS As System.IO.FileStream
Dim BR As System.IO.BinaryReader

FS = File.OpenRead("Image.udb")

BR = New BinaryReader(FS)

Data = BR.ReadBytes(Length)

-------

FS.Close() Inside FS watch variable see ObjectDisposedException and FS is
NOT nothing

BR.Close() BR set to Nothing after this

















Re: ObjectDisposedException HW
6/29/2006 5:11:01 PM
Sorry, i'm wondering why i am seeing an ObjectDisposedException
when i close the FS object. When i have FS set as a watch variable
in the debugger i see the exception inside the variable and it dosen't get
set to Nothing and is still pointing to an object after executing FS.Close
statement.

The BR object is correctly disposed. SO i'm wondering why the FS object
is not correctly disposed. The code looks ok to me.


[quoted text, click to view]

Re: ObjectDisposedException HW
6/30/2006 12:13:57 PM
It is getting thrown as inner exception. How does one go about
solving inner exceptions?


[quoted text, click to view]

AddThis Social Bookmark Button