P
Paul
I'm porting a C++ function which reads a file in binary mode, sometimes
reading 2 bytes into an unsigned short, 4 bytes into a long, etc into a C#
implementation. When using the FileStream.Read function, I'd like to code
it to read the size of a C# ushort, for example. The documentation says the
sizeof() is only supported in unsafe mode. Is there any equivalent to
sizeof() that I can use in managed code?
reading 2 bytes into an unsigned short, 4 bytes into a long, etc into a C#
implementation. When using the FileStream.Read function, I'd like to code
it to read the size of a C# ushort, for example. The documentation says the
sizeof() is only supported in unsafe mode. Is there any equivalent to
sizeof() that I can use in managed code?