diff --git a/Marshal.cs b/Marshal.cs index 86f6987..869c67d 100644 --- a/Marshal.cs +++ b/Marshal.cs @@ -39,6 +39,13 @@ namespace DiscImageChef.Helpers /// Provides methods to marshal binary data into C# structs public static class Marshal { + /// + /// Returns the size of an unmanaged type in bytes. + /// + /// The type whose size is to be returned. + /// The size, in bytes, of the type that is specified by the generic type parameter. + public static int SizeOf() => System.Runtime.InteropServices.Marshal.SizeOf(); + /// /// Marshal little-endian binary data to a structure ///