TargetParameterCountException 构造函数   
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 TargetParameterCountException 类的新实例。
重载
| TargetParameterCountException() | 用空消息字符串和异常的根源初始化 TargetParameterCountException 类的新实例。 | 
| TargetParameterCountException(String) | 用设置为给定消息的消息字符串和根源异常初始化 TargetParameterCountException 类的新实例。 | 
| TargetParameterCountException(String, Exception) | 使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 TargetParameterCountException 类的新实例。 | 
TargetParameterCountException()
用空消息字符串和异常的根源初始化 TargetParameterCountException 类的新实例。
public:
 TargetParameterCountException();public TargetParameterCountException ();Public Sub New ()注解
              TargetParameterCountException 从 Exception 继承。 此构造函数设置 Exception 对象的属性,如下表所示。
| properties | Value | 
|---|---|
| InnerException | null | 
| Message | 空字符串 (“”) 。 | 
适用于
TargetParameterCountException(String)
用设置为给定消息的消息字符串和根源异常初始化 TargetParameterCountException 类的新实例。
public:
 TargetParameterCountException(System::String ^ message);public TargetParameterCountException (string message);public TargetParameterCountException (string? message);new System.Reflection.TargetParameterCountException : string -> System.Reflection.TargetParameterCountExceptionPublic Sub New (message As String)参数
- message
- String
描述此异常的引发原因的 String。
注解
              TargetParameterCountException 从 Exception 继承。 此构造函数设置 对象的属性 Exception ,如下表所示。
| properties | 值 | 
|---|---|
| InnerException | null | 
| Message | message 字符串。 | 
适用于
TargetParameterCountException(String, Exception)
使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 TargetParameterCountException 类的新实例。
public:
 TargetParameterCountException(System::String ^ message, Exception ^ inner);public TargetParameterCountException (string message, Exception inner);public TargetParameterCountException (string? message, Exception? inner);new System.Reflection.TargetParameterCountException : string * Exception -> System.Reflection.TargetParameterCountExceptionPublic Sub New (message As String, inner As Exception)参数
- message
- String
解释异常原因的错误消息。
- inner
- Exception
导致当前异常的异常。 如果 inner 参数不为 null,则当前异常将在处理内部异常的 catch 块中引发。
注解
因前一个异常而直接引发的异常应在 InnerException 属性中包含对前一个异常的引用。 
              InnerException 属性将返回传递给构造函数的同一值;如果 InnerException 属性不向构造函数提供内部异常值,则返回 null。
下表显示了 TargetParameterCountException 实例的初始属性值。
| properties | “值” | 
|---|---|
| InnerException | 内部异常引用。 | 
| Message | 错误消息字符串。 |