[loader] LoadFrom of problematic images should reprobe
[mono-project.git] / mcs / errors / cs7070-2.cs
blobe618405b3c9491475ea2ad3537f0f893427364e2
1 // CS7070: Security attribute `DebugPermissionAttribute' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations
2 // Line: 11
4 using System;
5 using System.Security;
6 using System.Security.Permissions;
8 public class Program {
9 public delegate int DisplayHandler (string msg);
11 [DebugPermission (SecurityAction.RequestMinimum)]
12 public event DisplayHandler OnShow;
15 [AttributeUsage (AttributeTargets.All, AllowMultiple = true, Inherited = false)]
16 [Serializable]
17 public class DebugPermissionAttribute : CodeAccessSecurityAttribute {
19 public DebugPermissionAttribute (SecurityAction action)
20 : base (action)
24 public override IPermission CreatePermission ()
26 return null;