diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/EnumBuilder.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/EnumBuilder.Mono.cs index 961ea6ad69c38..a8702782ff19d 100644 --- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/EnumBuilder.Mono.cs +++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/EnumBuilder.Mono.cs @@ -57,7 +57,7 @@ internal EnumBuilder (ModuleBuilder mb, string name, TypeAttributes visibility, typeof(Enum), null, PackingSize.Unspecified, 0, null); _underlyingType = underlyingType; _underlyingField = _tb.DefineField ("value__", underlyingType, - (FieldAttributes.SpecialName | FieldAttributes.Private | FieldAttributes.RTSpecialName)); + FieldAttributes.Public | FieldAttributes.SpecialName | FieldAttributes.RTSpecialName); setup_enum_type (_tb); } diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.Mono.cs index a16592e68a76b..2e9143f2e2c26 100644 --- a/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.Mono.cs +++ b/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/Emit/FieldBuilder.Mono.cs @@ -64,7 +64,7 @@ internal FieldBuilder (TypeBuilder tb, string fieldName, Type type, FieldAttribu if (type == null) throw new ArgumentNullException ("type"); - attrs = attributes; + attrs = attributes & ~FieldAttributes.ReservedMask; name = fieldName; this.type = type; this.modReq = modReq;