Write byte to a text file in CSharp
Description
The following code shows how to write byte to a text file.
Example
/*from www.j a v a2 s . co m*/
using System;
using System.IO;
public class MainClass
{
static void Main(string[] args)
{
FileInfo MyFiles = new FileInfo(@"c:\Testing.txt");
FileStream MyFileStream1 = MyFiles.OpenWrite();
byte MyWriteByte = 100;
MyFileStream1.WriteByte(MyWriteByte);
MyFileStream1.Close();
}
}