fe777c5c82
Former-commit-id: 6a76a29bd07d86e57c6c8da45c65ed5447d38a61
33 lines
775 B
C#
33 lines
775 B
C#
// CS7070: Security attribute `DebugPermissionAttribute' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations
|
|
// Line: 11
|
|
|
|
using System;
|
|
using System.Security;
|
|
using System.Security.Permissions;
|
|
|
|
public class Program {
|
|
|
|
[DebugPermission (SecurityAction.LinkDemand)]
|
|
public int Show
|
|
{
|
|
get {
|
|
return 2;
|
|
}
|
|
}
|
|
}
|
|
|
|
[AttributeUsage (AttributeTargets.All, AllowMultiple = true, Inherited = false)]
|
|
[Serializable]
|
|
public class DebugPermissionAttribute : CodeAccessSecurityAttribute {
|
|
|
|
public DebugPermissionAttribute (SecurityAction action)
|
|
: base (action)
|
|
{
|
|
}
|
|
|
|
public override IPermission CreatePermission ()
|
|
{
|
|
return null;
|
|
}
|
|
}
|