DataGridViewCellStyle.IsDataSourceNullValueDefault 屬性

定義

取得指出是否已經設定 DataSourceNullValue 屬性的值。Gets a value indicating whether the DataSourceNullValue property has been set.

public:
 property bool IsDataSourceNullValueDefault { bool get(); };
[System.ComponentModel.Browsable(false)]
public bool IsDataSourceNullValueDefault { get; }
[<System.ComponentModel.Browsable(false)>]
member this.IsDataSourceNullValueDefault : bool
Public ReadOnly Property IsDataSourceNullValueDefault As Boolean

屬性值

Boolean

如果 DataSourceNullValue 屬性的值是預設值,則為 true,否則為 falsetrue if the value of the DataSourceNullValue property is the default value; otherwise, false.

屬性

備註

您可以使用這個屬性來判斷 DataSourceNullValue 屬性是否已明確設定,而不需要儲存其預設值進行比較。Use this property to determine whether the DataSourceNullValue property has been explicitly set without having to store its default value for comparison. 這項功能很有用 DataSourceNullValue ,因為屬性具有非空白的預設值,與其他 DataGridViewCellStyle 具有預設值的其他屬性(例如 nullEmpty 或)不同 NotSetThis is useful because the DataSourceNullValue property has a non-empty default value, unlike most other DataGridViewCellStyle properties, which have default values such as null, Empty, or NotSet.

適用於

另請參閱