public static int SizeOf()

in TPM Parser/Tpm2Lib/Globs.cs [292:315]


        public static int SizeOf(Type t)
        {
            //return NetToHostValue(t, ReverseByteOrder(data));

            if (t == typeof(byte) || t == typeof(sbyte))
            {
                return sizeof(byte);
            }
            if (t == typeof(ushort) || t == typeof(short))
            {
                return sizeof(ushort);
            }
            if (t == typeof(uint) || t == typeof(int))
            {
                return sizeof(uint);
            }
            if (t == typeof(ulong) || t == typeof(long))
            {
                return sizeof(ulong);
            }
            // Unsupported type
            Globs.Throw<ArgumentException>("Globs.SizeOf(): Unsupported type " + t);
            return 0;
        }