all groups > c# > february 2008 >
You're in the

c#

group:

find Count of open Streams?


Re: find Count of open Streams? Marc Gravell
2/27/2008 9:10:01 PM
c#:
[quoted text, click to view]

No; BinaryReader assumes ownership of the stream, and calling Close()/
Dispose() on the BinaryReader also calls Close() on the base-stream.
Sometimes this can be rritating ;-p Some other readers offer a flag in
the constructor to specify "should I also close the base reader?" -
but not this one.

You might, however, wish to consider "using" either of the stream/
reader; this would ensure that Dispose() is called regardless of
whether your method exist cleanly or via an exception.

[quoted text, click to view]

find Count of open Streams? viepia@nospam.com
2/27/2008 11:26:58 PM
Hi,

In the function

void close(BinaryReader br)
{
br.BaseStream.Close(); // Is this line necessary?
br.Close();
}

Is there a I/O function to find the number of open Stream(s) analogous to
LogStore.StreamCount?

Thanks,
Viepia

Re: find Count of open Streams? viepia@nospam.com
2/28/2008 8:18:48 AM
[quoted text, click to view]
Thanks!
Viepia

[quoted text, click to view]
AddThis Social Bookmark Button