public static ulong GetMTOfType(ClrType Type) { if (Type == null) { return(0UL); } object temp = AdHoc.GetMember(Type, "m_handle"); if (temp as ulong? == null) { temp = AdHoc.GetMember(Type.Heap.GetRuntime(), "ObjectMethodTable"); if (temp as ulong? == null) { return(0); } ; } return((ulong)temp); }