## Binary files

/csbook/solutions/18/A13.cs
 ```using System; using System.IO; class Point { public double x, y; public Point(double a, double b) { x = a; y = b; } } // Writes an array of points to a binary file and reads it in again public class BinaryFiles { static void Main(string[] arg) { Point[] points = {new Point(1.0,3.2), new Point(0.4,2.9), new Point(4.3,9.2)}; //--- writing the points FileStream s = new FileStream("data", FileMode.Create); BinaryWriter w = new BinaryWriter(s); w.Write(points.Length); foreach (Point p in points) { w.Write(p.x); w.Write(p.y); } w.Close(); s.Close(); //--- reading the points s = new FileStream("data", FileMode.Open); BinaryReader r = new BinaryReader(s); int len = r.ReadInt32(); points = new Point[len]; for (int i = 0; i < len; i++) { double x = r.ReadDouble(); double y = r.ReadDouble(); points[i] = new Point(x, y); } r.Close(); s.Close(); //--- test output on the screen foreach (Point p in points) Console.WriteLine("({0},{1})", p.x, p.y); } }```
{"ft_lang_label":"__label__en","ft_lang_prob":0.5712116,"math_prob":0.97417754,"size":950,"snap":"2021-31-2021-39","text_gpt3_token_len":273,"char_repetition_ratio":0.15221988,"word_repetition_ratio":0.013793103,"special_character_ratio":0.36105263,"punctuation_ratio":0.27753305,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99603003,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-07-29T01:28:36Z\",\"WARC-Record-ID\":\"<urn:uuid:dee825ca-652d-41a2-822e-a95bb574dc9b>\",\"Content-Length\":\"7540\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:8df22d19-5772-4dce-b8d6-40b95df4c65e>\",\"WARC-Concurrent-To\":\"<urn:uuid:177d2545-c853-4137-91df-31ca3dcba825>\",\"WARC-IP-Address\":\"140.78.148.6\",\"WARC-Target-URI\":\"http://www.dotnet.jku.at/csbook/solutions/18/A13.aspx\",\"WARC-Payload-Digest\":\"sha1:KMEFLWN5MA5LYQNOBUPXVICSJMPYAFQH\",\"WARC-Block-Digest\":\"sha1:MDCLWZQRR7BHDYC4OJTOL6XTQVCLA2DF\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-31/CC-MAIN-2021-31_segments_1627046153814.37_warc_CC-MAIN-20210729011903-20210729041903-00226.warc.gz\"}"}