Private void button3_click (object sender, system.eventargs e) {// write binary binaryWriter BW; // Create a binary filestream fs = new filestream (mappath ("mydata.data"), filemode.create; bw = new BinaryWriter (fs); // Initialize a binarywriter for (INT i = 0; i <200; i ) bw.write (i); // Write BW.CLOSE (); // Close}
Private void button4_click (object sender, system.eventargs e) {// Read binary binaryreader br; string str = ""; filestream fs = new filestream (Mappath ("MyData.Data"), filemode.open; br = new BinaryReader (FS); for (int i = 0; i