public void parse_table(BinaryReader inFile) { byte[] idstring = inFile.ReadBytes(6); Console.WriteLine(Convert.ToString(idstring)); }
It is a simple snippet: read the first 6 bytes of the file and convert that to a string.
However the console shows System.Byte[]
.
Maybe I'm using the wrong class for conversion. What should I be using? It will eventually be parsing filenames encoded in UTF-8, and I'm planning to use the same method to read all filenames.
Best Answer
It's actually:
or for UTF-8 specifically: