FontInfo.ShouldSerializeNames 方法

定義

判斷是否應該保存 Names 屬性。Determines whether the Names property should be persisted.

public:
 bool ShouldSerializeNames();
public bool ShouldSerializeNames ();
member this.ShouldSerializeNames : unit -> bool
Public Function ShouldSerializeNames () As Boolean

傳回

Boolean

如果 Names 屬性已從其預設值變更則為 true,否則為 falsetrue if the Names property has changed from its default value; otherwise, false.

備註

使用 ShouldSerializeNames 方法來判斷 Names 屬性是否已從其預設值變更。Use the ShouldSerializeNames method to determine whether the Names property has changed from its default value. 如果您要建立類別的設計工具, FontInfo 或建立您自己的控制項來併入類別,通常會使用這個方法 FontInfoThis method is commonly used if you are either creating a designer for the FontInfo class or creating your own control incorporating the FontInfo class.

注意

Names屬性必須至少有一個專案要序列化。The Names property must have at least one entry to be serialized.

適用於

另請參閱