DataGridViewCellStyle.IsFormatProviderDefault 属性

定义

获取一个值,该值指示是否已设置了 FormatProvider 属性。Gets a value that indicates whether the FormatProvider property has been set.

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

属性值

如果 true 属性为默认值,则为 FormatProvider;否则为 falsetrue if the FormatProvider property is the default value; otherwise, false.

属性

注解

使用此属性来确定是否已显式设置 FormatProvider 属性,而无需存储其默认值进行比较。Use this property to determine whether the FormatProvider property has been explicitly set without having to store its default value for comparison. 这非常有用,因为 FormatProvider 属性具有非空的默认值,这不同于大多数其他 DataGridViewCellStyle 属性,这些属性具有默认值,如 nullEmptyNotSetThis is useful because the FormatProvider property has a non-empty default value, unlike most other DataGridViewCellStyle properties, which have default values such as null, Empty, or NotSet.

适用于

另请参阅