BinaryWriter problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peyman

    BinaryWriter problem

    Hello all,
    This is my first c# program. And I seem to have a problem. Here is the
    code:

    FileStream myStream = new FileStream("d:\ \test.txt",
    FileMode.Create , FileAccess.Writ e);

    BinaryWriter writer = new BinaryWriter(my Stream);

    writer.Write("n testestse");
    writer.Close();

    In my text file I get a line feed 0x0a as the first char and then the
    string "ntestestse " (including the n). I have realised that if i
    change the string to test then I get a 0x09 (tab) as the first char in
    the file. so it seems to be related to the first char of my string.
    Any ideas???

    thanks
    Peyman Zehtab-Fard
Working...