Beispiel #1
0
        public FieldBuilder DefineInitializedData(string name, byte[] data, FieldAttributes attributes)
        {
            ArgumentNullException.ThrowIfNull(data);

            FieldAttributes maskedAttributes = attributes & ~FieldAttributes.ReservedMask;
            FieldBuilder    fb = DefineDataImpl(name, data.Length, maskedAttributes | FieldAttributes.HasFieldRVA);

            fb.SetRVAData(data);

            return(fb);
        }
Beispiel #2
0
        public FieldBuilder DefineInitializedData(string name, byte[] data, FieldAttributes attributes)
        {
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            FieldBuilder fb = DefineUninitializedData(name, data.Length,
                                                      attributes | FieldAttributes.HasFieldRVA);

            fb.SetRVAData(data);

            return(fb);
        }