The simple write-program programmed with 'using'. | Lecture 10 - slide 7 : 40 Program 2 |
using System.IO; class ReadProg { static void Main() { using(Stream s = new FileStream("myFile.txt", FileMode.Create)){ s.WriteByte(79); // O 01001111 s.WriteByte(79); // O 01001111 s.WriteByte(80); // P 01010000 } } } |