DbColumn.AllowDBNull 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取可为 null 的布尔值,该值指示此列中是否允许 DBNull 值,或者在未设置任何值时返回 null。 在派生类中重写时,可设置为 true 或 false,指示此列中是否允许 DBNull 值,也可设置为 null(在 Visual Basic 中为 Nothing)。
public: property Nullable<bool> AllowDBNull { public:
Nullable<bool> get(); protected:
void set(Nullable<bool> value); };
public bool? AllowDBNull { get; protected set; }
member this.AllowDBNull : Nullable<bool> with get, set
Public Property AllowDBNull As Nullable(Of Boolean)
属性值
如果此列中允许 DBNull 值,则返回 true,否则,返回 false。 如果未设置任何值,则返回空引用(在 Visual Basic 中为 Nothing)。