sizeof() vs Marshal.SizeOf()
To get the size of a data type in .Net you can use or . I’ll briefly explain the difference between the two. sizeof() (MSDN) can only be used on data types that have a known size at compile-time. It is compiled as a constant. If you attempt to use it on invalid … Read more