Howard Bash
asked on
Using System.IO.StreamWriter
How can I determine the state of a stream writer object? I would like to know if it is open so that I can close it in my try catch finally block.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I have not seen any status property. Disposing it would close it as well.
Yes. In the case of a finally block, as you've described, there is no need to know the status.
Doh! I gotta learn to type quicker. ;)
If your intention is to close it then tgerbert ways is the best choice.
ASKER