yaronkl

yaronkl

  • NA
  • 1
  • 0

Reading binary strucutres

May 8 2005 8:41 AM
Hi , I am trying to write a C# program to read a binary file. The records have a predefined strucutre. Problem is I have no idea to to define the struct in C# in the way I did in C++. I also need the strucutre to be in 1 byte alignment. In C++ the structure looks as follows: #pragma pack(1) struct my_struct_ { unsigned char fld1[10]; long fld2; short fld3; }; #pragma pack() thank you.