A
Andrew Falanga
Hi,
I'm looking through the object browser in VS and I'm not seeing a Re-
Open function in the FileStream class. So, I'm wondering how would
one do that? If I have a FileStream object that I Close( ), can I
simply new another one and assign to the same variable? Like this:
System.IO.FileStream fs = new System.IO.FileStream("somefile");
// doing important stuff
fs.Close( ); // releases file handles and such
// doing other important stuff
fs = new System.IO.FileStream("somefile");
Can that be done with the same FileStream object or does C# not allow
that?
Andy
I'm looking through the object browser in VS and I'm not seeing a Re-
Open function in the FileStream class. So, I'm wondering how would
one do that? If I have a FileStream object that I Close( ), can I
simply new another one and assign to the same variable? Like this:
System.IO.FileStream fs = new System.IO.FileStream("somefile");
// doing important stuff
fs.Close( ); // releases file handles and such
// doing other important stuff
fs = new System.IO.FileStream("somefile");
Can that be done with the same FileStream object or does C# not allow
that?
Andy