This documentation is archived and is not being maintained.

ReflectionPermission.ReflectionPermission(ReflectionPermissionFlag) Constructor

Initializes a new instance of the ReflectionPermission class with the specified access.

Namespace: System.Security.Permissions
Assembly: mscorlib (in mscorlib.dll)

public ReflectionPermission (
	ReflectionPermissionFlag flag
)
public ReflectionPermission (
	ReflectionPermissionFlag flag
)
public function ReflectionPermission (
	flag : ReflectionPermissionFlag
)
Not applicable.

Parameters

flag

One of the ReflectionPermissionFlag values.

Exception typeCondition

ArgumentException

The flag parameter is not a valid value of ReflectionPermissionFlag.

The following code example shows the use of the System.Security.Permissions.ReflectionPermission(ReflectionPermissionFlag) constructor. This example is part of a larger example provided for the ReflectionPermission class.

ReflectionPermission reflectionPerm2 = new ReflectionPermission(ReflectionPermissionFlag.ReflectionEmit);

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Show: