public class SecurityException : SystemException
Object
Exception
SystemException
SecurityException
mscorlib
BCL
Represents the error that occurs when an application does not have the permissions required to access a resource or perform a secured operation.
[Note: For more information about permissions and security, see Partition V of the CLI specification.The following IL instructions throw SecurityException:
]
- call
- calli
- callvirt
System.Security Namespace
SecurityException Constructors
SecurityException() Constructor
SecurityException(System.String) Constructor
SecurityException(System.String, System.Exception) Constructor
public SecurityException();
Constructs and initializes a new instance of the SecurityException class.
This constructor initializes the System.Security.SecurityException.Message property of the new instance to a system-supplied message that describes the error, such as "A security violation has occurred." This message takes into account the current system culture.The System.Security.SecurityException.InnerException property of the new instance is initialized to
null
.
System.Security.SecurityException Class, System.Security Namespace
public SecurityException(string message);
Constructs and initializes a new instance of the SecurityException class.
- message
- A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
This constructor initializes the System.Security.SecurityException.Message property of the new instance using message. If message isnull
, the System.Security.SecurityException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.The System.Security.SecurityException.InnerException property of the new instance is initialized to
null
.
System.Security.SecurityException Class, System.Security Namespace
public SecurityException(string message, Exception inner);
Constructs and initializes a new instance of the SecurityException class.
- message
- A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
- inner
- An instance of SecurityException that is the cause of the current exception. If inner is non-null, then the current Exception was raised in a catch block handling inner.
This constructor initializes the System.Security.SecurityException.Message property of the new instance using message and the System.Security.SecurityException.InnerException property using inner. If message isnull
, the System.Security.SecurityException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.[Note: For more information on inner exceptions, see System.Exception.InnerException.]
System.Security.SecurityException Class, System.Security Namespace