ReflectionPermission Constructor (ReflectionPermissionFlag)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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

Exception Condition

The flag parameter is not a valid value of ReflectionPermissionFlag.

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

ReflectionPermission restrictedMemberAccessPerm = new ReflectionPermission(ReflectionPermissionFlag.RestrictedMemberAccess);

.NET Framework
Available since 1.1
Return to top