<PackageReference Include="System.Security.Permissions" Version="5.0.0-preview.2.20160.6" />

PolicyException

The exception that is thrown when policy forbids code to run.
public PolicyException()

Initializes a new instance of the PolicyException class with default properties.

Initializes a new instance of the PolicyException class with serialized data.

public PolicyException(string message)

Initializes a new instance of the PolicyException class with a specified error message.

public PolicyException(string message, Exception exception)

Initializes a new instance of the PolicyException class with a specified error message and a reference to the inner exception that is the cause of this exception.