Merge pull request #3622 from rolfbjarne/remove-stray-file
[mono.git] / mcs / class / corlib / System.Security.Permissions / ReflectionPermission.cs
index bb7dabcfad3c4b2f4b1f717d772c2bc86f97b213..b26c566a3b9f5610b08507d493f9b0e775b4e735 100644 (file)
@@ -34,9 +34,7 @@ using System.Runtime.InteropServices;
 
 namespace System.Security.Permissions {
 
-#if NET_2_0
        [ComVisible (true)]
-#endif
        [Serializable]
        public sealed class ReflectionPermission : CodeAccessPermission, IUnrestrictedPermission, IBuiltInPermission {
 
@@ -63,7 +61,9 @@ namespace System.Security.Permissions {
                public ReflectionPermissionFlag Flags {
                        get { return flags; }
                        set {
-                               if ((value & ReflectionPermissionFlag.AllFlags) != value) {
+                               const ReflectionPermissionFlag all_flags = ReflectionPermissionFlag.AllFlags | ReflectionPermissionFlag.RestrictedMemberAccess;
+
+                               if ((value & all_flags) != value) {
                                        string msg = String.Format (Locale.GetText ("Invalid flags {0}"), value);
                                        throw new ArgumentException (msg, "ReflectionPermissionFlag");
                                }