Class NotAdminException
Like a UnauthorizedAccessException but with the additional hint that retrying the operation as an administrator would fix the problem.
[Serializable]
public class NotAdminException : UnauthorizedAccessException
- Inheritance
-
NotAdminException
- Extension Methods
Constructors
NotAdminException()
Initializes a new instance of the UnauthorizedAccessException class.
public NotAdminException()
NotAdminException(SerializationInfo, StreamingContext)
Initializes a new instance of the UnauthorizedAccessException class with serialized data.
protected NotAdminException(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.
context
StreamingContextThe StreamingContext that contains contextual information about the source or destination.
NotAdminException(string)
Initializes a new instance of the UnauthorizedAccessException class with a specified error message.
public NotAdminException(string message)
Parameters
message
stringThe message that describes the error.
NotAdminException(string, Exception)
Initializes a new instance of the UnauthorizedAccessException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public NotAdminException(string message, Exception inner)
Parameters
message
stringThe error message that explains the reason for the exception.
inner
ExceptionThe exception that is the cause of the current exception. If the
inner
parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception.