Example #1
0
 public override string ToString()
 {
     return(RuntimeAugments.GetLastResortString(_typeHandle));
 }
Example #2
0
        public override uint GetStructFieldOffset(RuntimeTypeHandle structureTypeHandle, string fieldName)
        {
            if (TryGetStructFieldOffset(structureTypeHandle, fieldName, out bool structExists, out uint offset))
            {
                return(offset);
            }

            // if we can find the struct but couldn't find its field, throw Argument Exception
            if (structExists)
            {
                throw new ArgumentException(SR.Format(SR.Argument_OffsetOfFieldNotFound, RuntimeAugments.GetLastResortString(structureTypeHandle)), nameof(fieldName));
            }

            throw new MissingInteropDataException(SR.StructMarshalling_MissingInteropData, Type.GetTypeFromHandle(structureTypeHandle));
        }
 public sealed override string GetLastResortString(RuntimeTypeHandle typeHandle)
 {
     return(RuntimeAugments.GetLastResortString(typeHandle));
 }