S
SteveK
I am reading a binary file spit out from C FILE*
I would like to use Marshal.SizeOf() to get the size of the types I'm
reading, but I just realized that a C# boolean is 4 bytes versus the C 1
byte.
So, I found some snippets that I could play with and thought maybe this
would work;
int sz = Marshal.SizeOf(UnmanagedType.Bool);
This throws the unhandled exception 'System.ArgumentException'
How can I accomplish what I'm after? Any ideas?
I would like to use Marshal.SizeOf() to get the size of the types I'm
reading, but I just realized that a C# boolean is 4 bytes versus the C 1
byte.
So, I found some snippets that I could play with and thought maybe this
would work;
int sz = Marshal.SizeOf(UnmanagedType.Bool);
This throws the unhandled exception 'System.ArgumentException'
How can I accomplish what I'm after? Any ideas?