ChangeRejectedException 构造函数
定义
初始化 ChangeRejectedException 类的新实例。Initializes a new instance of the ChangeRejectedException class.
重载
| ChangeRejectedException() |
使用说明错误的系统提供的消息初始化 ChangeRejectedException 类的新实例。Initializes a new instance of the ChangeRejectedException class with a system-supplied message that describes the error. |
| ChangeRejectedException(IEnumerable<CompositionError>) |
使用组合错误的列表初始化 ChangeRejectedException 类的新实例。Initializes a new instance of the ChangeRejectedException class with a list of composition errors. |
| ChangeRejectedException(String) |
使用说明错误的指定消息初始化 ChangeRejectedException 类的新实例。Initializes a new instance of the ChangeRejectedException class with a specified message that describes the error. |
| ChangeRejectedException(String, Exception) |
使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 ChangeRejectedException 类的新实例。Initializes a new instance of the ChangeRejectedException class with a specified error message and a reference to the inner exception that is the cause of this exception. |
ChangeRejectedException()
使用说明错误的系统提供的消息初始化 ChangeRejectedException 类的新实例。Initializes a new instance of the ChangeRejectedException class with a system-supplied message that describes the error.
public:
ChangeRejectedException();
public ChangeRejectedException ();
Public Sub New ()
注解
此构造函数将 Message 新实例的属性初始化为系统提供的描述错误的消息,如 "DefaultMessageDisplayedByParameterlessCtorWriterMustSupply"。此消息将考虑当前系统区域性。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.
下表显示了 InsufficientMemoryException 实例的初始属性值。The following table shows the initial property values for an instance of InsufficientMemoryException.
| PropertyProperty | 值Value |
|---|---|
| InnerException | null.null. |
| Message | 本地化的错误消息字符串。The localized error message string. |
适用于
ChangeRejectedException(IEnumerable<CompositionError>)
使用组合错误的列表初始化 ChangeRejectedException 类的新实例。Initializes a new instance of the ChangeRejectedException class with a list of composition errors.
public:
ChangeRejectedException(System::Collections::Generic::IEnumerable<System::ComponentModel::Composition::CompositionError ^> ^ errors);
public ChangeRejectedException (System.Collections.Generic.IEnumerable<System.ComponentModel.Composition.CompositionError> errors);
public ChangeRejectedException (System.Collections.Generic.IEnumerable<System.ComponentModel.Composition.CompositionError>? errors);
new System.ComponentModel.Composition.ChangeRejectedException : seq<System.ComponentModel.Composition.CompositionError> -> System.ComponentModel.Composition.ChangeRejectedException
Public Sub New (errors As IEnumerable(Of CompositionError))
参数
- errors
- IEnumerable<CompositionError>
组合期间发生的错误的集合。A collection of errors that occurred during composition.
适用于
ChangeRejectedException(String)
使用说明错误的指定消息初始化 ChangeRejectedException 类的新实例。Initializes a new instance of the ChangeRejectedException class with a specified message that describes the error.
public:
ChangeRejectedException(System::String ^ message);
public ChangeRejectedException (string message);
public ChangeRejectedException (string? message);
new System.ComponentModel.Composition.ChangeRejectedException : string -> System.ComponentModel.Composition.ChangeRejectedException
Public Sub New (message As String)
参数
- 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.
注解
下表显示了 ChangeRejectedException 实例的初始属性值。The following table shows the initial property values for an instance of ChangeRejectedException.
| PropertyProperty | 值Value |
|---|---|
| InnerException | null.null. |
| Message | message 中指定的错误消息字符串。The error message string specified in message. |
适用于
ChangeRejectedException(String, Exception)
使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 ChangeRejectedException 类的新实例。Initializes a new instance of the ChangeRejectedException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public:
ChangeRejectedException(System::String ^ message, Exception ^ innerException);
public ChangeRejectedException (string message, Exception innerException);
public ChangeRejectedException (string? message, Exception? innerException);
new System.ComponentModel.Composition.ChangeRejectedException : string * Exception -> System.ComponentModel.Composition.ChangeRejectedException
Public Sub New (message As String, innerException As Exception)
参数
- 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. 如果 innerException 参数不为 null,则当前异常将在处理内部异常的 catch 块中引发。If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.
注解
因前一个异常而直接引发的异常应在 InnerException 属性中包含对前一个异常的引用。An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. InnerException属性返回传递给构造函数的相同值,或者, null 如果 InnerException 属性不向构造函数提供内部异常值,则为。The InnerException property returns the same value that is passed to the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.
下表显示了 ChangeRejectedException 实例的初始属性值。The following table shows the initial property values for an instance of ChangeRejectedException.
| PropertyProperty | 值Value |
|---|---|
| InnerException | null.null. |
| Message | message 中指定的错误消息字符串。The error message string specified in message. |