Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
C で記述されたバイナリ ファイルがあり、これには長い数のストリームが含まれています。最初に int の 4 倍が含まれているため (最初の 16 バイトは 4 つの int です)、次に double が含まれています (8 バイトごとに新しい double を想定しています)。
どこにもスペースはありません。今度は C# でデータを読み取る必要がありますが、これまで試したことはすべてうまくいきませんでした。何か提案はありますか?
using (BinaryReader br = new BinaryReader(File.Open("file", FileMode.Open))) { int a = br.ReadInt32(); int b = br.ReadInt32(); int c = br.ReadInt32(); int d = br.ReadInt32(); double e = br.ReadDouble(); double f = br.ReadDouble(); ... }