title: How to write some text as bytes (without encoding)
body: <p>I need to generate a file that will be read by another system. For this reason, it should be in binary, not text with some encoding.</p>
  
  <p>Here's the code I'm using:</p>
  
  <pre><code>        using (FileStream stream = new FileStream(fileName, FileMode.Create))
          {
              using (BinaryWriter writer = new BinaryWriter(stream))
              {
                  writer.Write("Some text" + Environment.NewLine);
                  writer.Write("Some more text" + Environment.NewLine);
              }
          }
  </code></pre>
  
  <p>When I open the file and look at it, I can see some special character at the start of each line, similar to this (hard to paste it here, since it doesn't show the same):</p>
  
  <p>~Some text</p>
  
  <p>~Some more text</p>
  
  <p>What am I doing wrong/forgetting? </p>
  
  <p>Thanks for your help.</p>