TrustNotGrantedException Constructors

Definition

Initializes a new instance of the TrustNotGrantedException class.

Overloads

TrustNotGrantedException()

Initializes a new instance of the TrustNotGrantedException class with a system-supplied message that describes the error.

TrustNotGrantedException(String)

Initializes a new instance of the TrustNotGrantedException class with a specified message that describes the error.

TrustNotGrantedException(SerializationInfo, StreamingContext)

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

TrustNotGrantedException(String, Exception)

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

TrustNotGrantedException()

Initializes a new instance of the TrustNotGrantedException class with a system-supplied message that describes the error.

C#
public TrustNotGrantedException();

Remarks

This constructor initializes the Message property of the new instance to a system-supplied message that describes the error, such as "DefaultMessageDisplayedByParameterlessCtorWriterMustSupply" This message takes into account the current system culture.

The following table shows the initial property values for an instance of InsufficientMemoryException.

Property Value
InnerException null.
Message The localized error message string.

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

TrustNotGrantedException(String)

Initializes a new instance of the TrustNotGrantedException class with a specified message that describes the error.

C#
public TrustNotGrantedException(string message);

Parameters

message
String

The message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

Remarks

The following table shows the initial property values for an instance of TrustNotGrantedException.

Property Value
InnerException null.
Message The error message string specified in message.

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

TrustNotGrantedException(SerializationInfo, StreamingContext)

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

C#
protected TrustNotGrantedException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);

Parameters

serializationInfo
SerializationInfo

The object that holds the serialized object data.

streamingContext
StreamingContext

The contextual information about the source or destination.

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

TrustNotGrantedException(String, Exception)

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

C#
public TrustNotGrantedException(string message, Exception innerException);

Parameters

message
String

The message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

innerException
Exception

The exception that is the cause of the current exception. If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1