Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SecurityException Constructor (String, Type)


Initializes a new instance of the SecurityException class with a specified error message and the permission type that caused the exception to be thrown.

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

public SecurityException(
	string message,
	Type type


Type: System.String

The error message that explains the reason for the exception.

Type: System.Type

The type of the permission that caused the exception to be thrown.

The following table shows the property values set by this constructor.




The localized error message string specified by message.


The Type of the permission that failed, specified by type.

Legacy Code Example

For an example of the use of a SecurityException constructor, see the example provided for the SecurityException(String, Object, Object, MethodInfo, Object, IPermission) constructor.

.NET Framework
Available since 1.1
Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft