我希望我的程序讀取二進制文件的十六進制值并計算出現的“45”,現在停留在計數字節模式上。public static byte[] GetOccurrence(string dump){ using (BinaryReader b = new BinaryReader(new FileStream(dump, FileMode.Open))) { bufferB = new byte[32]; b.BaseStream.Seek(0x000000, SeekOrigin.Begin); b.Read(bufferB, 0, 32); return bufferB; }} bufferA = GetOccurrence(textOpen.Text); // textOpen.Text is the opened file// bufferA now stores 53 4F 4E 59 20 43 4F 4D 50 55 54 45 52 20 45 4E 54 45 52 54 41 49 4E 4D 45 4E 54 20 49 4E 43 2E// trying to count occurrence of '45' and display the total occurrence in textbox
計算二進制文件中字節模式的出現次數
幕布斯6054654
2022-07-10 16:27:55