using System; using System.IO; using System.Reflection; using System.Runtime.InteropServices; namespace MonoGame.Utilities { internal static partial class ReflectionHelpers { /// /// Generics handler for Marshal.SizeOf /// internal static class SizeOf { static int _sizeOf; static SizeOf() { _sizeOf = Marshal.SizeOf(); } static public int Get() { return _sizeOf; } } /// /// Fallback handler for Marshal.SizeOf(type) /// internal static int ManagedSizeOf(Type type) { return Marshal.SizeOf(type); } } }