InvalidFilterCriteriaException 构造函数

定义

初始化 InvalidFilterCriteriaException 类的实例。Initializes an instance of the InvalidFilterCriteriaException class.

重载

InvalidFilterCriteriaException()

使用默认属性初始化 InvalidFilterCriteriaException 类的新实例。Initializes a new instance of the InvalidFilterCriteriaException class with the default properties.

InvalidFilterCriteriaException(String)

使用给定的 HRESULT 和消息字符串初始化 InvalidFilterCriteriaException 类的新实例。Initializes a new instance of the InvalidFilterCriteriaException class with the given HRESULT and message string.

InvalidFilterCriteriaException(SerializationInfo, StreamingContext)

使用指定的序列化和上下文信息初始化 InvalidFilterCriteriaException 类的新实例。Initializes a new instance of the InvalidFilterCriteriaException class with the specified serialization and context information.

InvalidFilterCriteriaException(String, Exception)

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 InvalidFilterCriteriaException 类的新实例。Initializes a new instance of the InvalidFilterCriteriaException class with a specified error message and a reference to the inner exception that is the cause of this exception.

InvalidFilterCriteriaException()

使用默认属性初始化 InvalidFilterCriteriaException 类的新实例。Initializes a new instance of the InvalidFilterCriteriaException class with the default properties.

public:
 InvalidFilterCriteriaException();
public InvalidFilterCriteriaException ();
Public Sub New ()

注解

此构造函数 InvalidFilterCriteriaException 使用空消息字符串和将根源异常设置为来初始化的实例 nullThis constructor initializes an instance of InvalidFilterCriteriaException with an empty message string and the root cause exception set to null.

此构造函数将设置对象的属性 Exception ,如下所示:This constructor sets the properties of the Exception object as follows:

属性Property ValueValue
InnerException nullnull
Message 空字符串 ( "" ) 。The empty string ("").

适用于

InvalidFilterCriteriaException(String)

使用给定的 HRESULT 和消息字符串初始化 InvalidFilterCriteriaException 类的新实例。Initializes a new instance of the InvalidFilterCriteriaException class with the given HRESULT and message string.

public:
 InvalidFilterCriteriaException(System::String ^ message);
public InvalidFilterCriteriaException (string? message);
public InvalidFilterCriteriaException (string message);
new System.Reflection.InvalidFilterCriteriaException : string -> System.Reflection.InvalidFilterCriteriaException
Public Sub New (message As String)

参数

message
String

异常消息文本。The message text for the 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 属性将返回传递给构造函数的同一值;如果 InnerException 属性不向构造函数提供内部异常值,则返回 nullThe InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

下表显示了 InvalidFilterCriteriaException 实例的初始属性值。The following table shows the initial property values for an instance of InvalidFilterCriteriaException.

propertiesProperty ValueValue
InnerException null
Message 错误消息字符串。The error message string.

适用于

InvalidFilterCriteriaException(SerializationInfo, StreamingContext)

使用指定的序列化和上下文信息初始化 InvalidFilterCriteriaException 类的新实例。Initializes a new instance of the InvalidFilterCriteriaException class with the specified serialization and context information.

protected:
 InvalidFilterCriteriaException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected InvalidFilterCriteriaException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Reflection.InvalidFilterCriteriaException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Reflection.InvalidFilterCriteriaException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

SerializationInfo 对象,包含序列化此实例所需的信息。A SerializationInfo object that contains the information required to serialize this instance.

context
StreamingContext

StreamingContext 对象,包含与此实例关联的序列化流的源和目标。A StreamingContext object that contains the source and destination of the serialized stream associated with this instance.

适用于

InvalidFilterCriteriaException(String, Exception)

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 InvalidFilterCriteriaException 类的新实例。Initializes a new instance of the InvalidFilterCriteriaException class with a specified error message and a reference to the inner exception that is the cause of this exception.

public:
 InvalidFilterCriteriaException(System::String ^ message, Exception ^ inner);
public InvalidFilterCriteriaException (string? message, Exception? inner);
public InvalidFilterCriteriaException (string message, Exception inner);
new System.Reflection.InvalidFilterCriteriaException : string * Exception -> System.Reflection.InvalidFilterCriteriaException
Public Sub New (message As String, inner As Exception)

参数

message
String

解释异常原因的错误消息。The error message that explains the reason for the exception.

inner
Exception

导致当前异常的异常。The exception that is the cause of the current exception. 如果 inner 参数不为 null,则当前异常将在处理内部异常的 catch 块中引发。If the inner 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 属性将返回传递给构造函数的同一值;如果 InnerException 属性不向构造函数提供内部异常值,则返回 nullThe InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

下表显示了 InvalidFilterCriteriaException 实例的初始属性值。The following table shows the initial property values for an instance of InvalidFilterCriteriaException.

propertiesProperty “值”Value
InnerException 内部异常引用。The inner exception reference.
Message 错误消息字符串。The error message string.

另请参阅

适用于