Export (0) Print
Expand All

SecurityAttribute.CreatePermission Method

When overridden in a derived class, creates a permission object that can then be serialized into binary form and persistently stored along with the SecurityAction in an assembly's metadata.

[Visual Basic]
Public MustOverride Function CreatePermission() As IPermission
[C#]
public abstract IPermission CreatePermission();
[C++]
public: virtual IPermission* CreatePermission() = 0;
[JScript]
public abstract function CreatePermission() : IPermission;

Return Value

A serializable permission object.

Remarks

At compile time, attributes convert security declarations to a serialized form in metadata. Declarative security data in metadata is created from the permission that this method returns that corresponds to this attribute.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Common Language Infrastructure (CLI) Standard

See Also

SecurityAttribute Class | SecurityAttribute Members | System.Security.Permissions Namespace

Show:
© 2015 Microsoft