dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] [bug #13443] static FileStream not written to disk on


From: anonymous
Subject: [Pnet-developers] [bug #13443] static FileStream not written to disk on exit without Close()
Date: Sat, 18 Jun 2005 16:18:23 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13443>

                 Summary: static FileStream not written to disk on exit
without Close()
                 Project: DotGNU Portable.NET
            Submitted by: None
            Submitted on: Sam 18.06.2005 um 12:18
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________

Details:

Look at the following example:
The program writes 5 bytes, but exits without calling s.Close().
In MS.NET and Mono, you have the 5 bytes on the disk; in portable.net, the
file is 0 byte long.
If you declare the instance of FileStream localy inside Main(), it works as
expected.

public class StreamTest {
        static System.IO.FileStream s;
        public static void Main(string[] args) {
                byte[] b = new byte[5];
                s = new System.IO.FileStream("streamtest.out",
System.IO.FileMode.Create);
                for (byte i=0; i<5; i++) b[i]=(byte)(i+65);
                s.Write(b,0,5);
        }
}






    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sam 18.06.2005 um 12:18  Name: StreamTest.cs  Size: 272B   By: None
test case
<http://savannah.gnu.org/bugs/download.php?item_id=13443&item_file_id=2613>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13443>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]