StreamWriter closes MemoryStream???

From: Bob Rock (nospam.yet_another_apprentice_at_hotmail.com)
Date: 05/14/04


Date: Fri, 14 May 2004 13:41:13 +0200

Hello,

I've noticed that after calling the Close method on a StreamWriter, I get
exceptions on any operation I might request on the associated stream (with a
message "Cannot access a closed Stream"). Is this the behaviour I must
expect? Nothing is said on the documentation.

Bob Rock



Relevant Pages

  • Re: 8ms Timer for serial port access
    ... Then start calling readagain. ... stream of bytes that you acquire by calling read. ... Forget about timing. ... can read and be guaranteed that you have a complete frame). ...
    (comp.os.linux.development.apps)
  • Re: SetPositions() being called at the end of the stream
    ... debugger to see who's calling it. ... quartz.dll is calling this function. ... except at the end of the stream. ... Try putting a breakpoint there and check the call stack in the ...
    (microsoft.public.win32.programmer.directx.video)
  • log4net question
    ... I simply get the stream for the logger and do: ... reader and reading the contents into a string and the string looks correct. ... The problem is, after calling XmlConfigurator.Configure, my log still has ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How can I get output buffer with CeRapiInvoke
    ... Which way are you using the call, block or stream? ... DLL function you're calling and the code that's trying to access the data. ... When I want to read pOut, my desktop's program would crash. ...
    (microsoft.public.windowsce.app.development)
  • RE: FTP problems
    ... As far as calling the ".close" function goes, for that you would need to ... first make a stream object and close it as is given below ... can you do a ".close" on your stream and then try the code? ... many using the ftpWebRequest object, ...
    (microsoft.public.dotnet.framework.aspnet)