PropertyConstraintException 类
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]
表示属性约束异常类。 请注意,此类具有状态 - 因此,即使您更改其内部,也可能是重大更改。
继承层次结构
System.Object
System.Exception
System.SystemException
System.Data.DataException
System.Data.ConstraintException
System.Data.Entity.Core.PropertyConstraintException
命名空间: System.Data.Entity.Core
程序集: EntityFramework(在 EntityFramework.dll 中)
语法
声明
<SerializableAttribute> _
<SuppressMessageAttribute("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification := "SerializeObjectState used instead")> _
Public NotInheritable Class PropertyConstraintException _
Inherits ConstraintException
用法
Dim instance As PropertyConstraintException
[SerializableAttribute]
[SuppressMessageAttribute("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification = "SerializeObjectState used instead")]
public sealed class PropertyConstraintException : ConstraintException
[SerializableAttribute]
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1032:ImplementStandardExceptionConstructors", Justification = L"SerializeObjectState used instead")]
public ref class PropertyConstraintException sealed : public ConstraintException
[<SealedAttribute>]
[<SerializableAttribute>]
[<SuppressMessageAttribute("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification = "SerializeObjectState used instead")>]
type PropertyConstraintException =
class
inherit ConstraintException
end
public final class PropertyConstraintException extends ConstraintException
PropertyConstraintException 类型公开以下成员。
构造函数
名称 | 描述 | |
---|---|---|
PropertyConstraintException() | 初始化 PropertyConstraintException 类的新实例。 | |
PropertyConstraintException(String) | 初始化 PropertyConstraintException 类的新实例。 | |
PropertyConstraintException(String, Exception) | 使用提供的消息和内部异常初始化 PropertyConstraintException 类的新实例 | |
PropertyConstraintException(String, String) | 初始化 PropertyConstraintException 类的新实例。 | |
PropertyConstraintException(String, String, Exception) | 初始化 PropertyConstraintException 类的新实例。 |
顶部
属性
名称 | 描述 | |
---|---|---|
Data | (继承自 Exception。) | |
HelpLink | (继承自 Exception。) | |
HResult | (继承自 Exception。) | |
InnerException | (继承自 Exception。) | |
Message | (继承自 Exception。) | |
PropertyName | 获取违反了约束的属性的名称。 | |
Source | (继承自 Exception。) | |
StackTrace | (继承自 Exception。) | |
TargetSite | (继承自 Exception。) |
顶部
方法
名称 | 描述 | |
---|---|---|
Equals | (继承自 Object。) | |
GetBaseException | (继承自 Exception。) | |
GetHashCode | (继承自 Object。) | |
GetObjectData | 安全关键。 (继承自 Exception。) | |
GetType | (继承自 Exception。) | |
ToString | (继承自 Exception。) |
顶部
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。