// private String[] SplitString(String aString) // { // return (new Regex(" ")).Split(aString); // } /// <summary> /// Test method /// </summary> static void Main() { String inFile = "\\My Documents\\testBytes.txt"; Console.WriteLine("Infile: " + inFile); ByteReader br = new ByteReader(inFile); br.OpenFile(); bool gotByte = false; int[] i = new int[1]; //byte[] b = new byte[1]; do { //gotByte = br.ReadByte(b); gotByte = br.ReadInt(i); if (gotByte) { Console.Write(i); } else { Console.WriteLine("Could not read an int as bytes"); } } while (gotByte); br.CloseFile(); }
// private String[] SplitString(String aString) // { // return (new Regex(" ")).Split(aString); // } /// <summary> /// Test method /// </summary> static void Main() { String inFile = "\\My Documents\\testBytes.txt"; Console.WriteLine("Infile: " + inFile); ByteReader br = new ByteReader(inFile); br.OpenFile(); bool gotByte = false; int[] i = new int[1]; //byte[] b = new byte[1]; do { //gotByte = br.ReadByte(b); gotByte = br.ReadInt(i); if (gotByte) { Console.Write(i); } else Console.WriteLine("Could not read an int as bytes"); } while (gotByte); br.CloseFile(); }