I am reading lines from a binary file. Each line has zero termination. Encoding - UTF-8. In python, I just read the byte, check if it is 0, add it to the byte array and continue reading bytes until I see 0. Then I convert the byte array to a string and move on. All lines were read correctly.
How can I read this in C #? I don’t think I have the luxury of just adding bytes to an array, since arrays are of a fixed size.
source
share