I'm asking a simple question but i can't find the easiest way to do that, my application read a small file, Simply the 8 bytes word "uploaded" read from just 8 byte file, will be a binary array of 0,1... or list of true-false and the length is 8*8= 64 bits, NOW I already have this 64 bits in a array of string and also list of Boolean, the code below is faster and i just need to edit the code to give me a 8-bits per time not 1 byte..**** with MemoryStream
string path = openFileDialog1.FileName;
byte[] file = File.ReadAllBytes(path);
MemoryStream memory = new MemoryStream(file);
BinaryReader reader = new BinaryReader(memory);
for (int i = 0; i <= file.Length - 1; i++)
{
byte result = reader.ReadByte();
}
After editing this code, i just need to write back this bits
01110101-01110000-01101100-01101111-01100001-01100100-01100101-01100100 to be uploaded
to bytes then Write it back to a valid file.?? i'm really tired because i see many methods to write a bytes array as a file but not a bits... i'm tired because i can't find a way out !!