Example #1
0
        byte[] ReadInitialValue_NoLock(RVA rva)
        {
            // rva could be 0 if it's a dynamic module. The caller is responsible for checking the
            // HasFieldRVA bit before calling this method.
            int ptrSize = IntPtr.Size;

            if (!GetFieldSize(ownerType, signature as FieldSig, ptrSize, out uint size))
            {
                return(null);
            }
            if (size >= int.MaxValue)
            {
                return(null);
            }
            return(readerModule.ReadFieldInitialValue(this, (uint)rva, (int)size));
        }