ParenthesizePropertyNameAttribute 類別

定義

指示關聯屬性的名稱是否使用括號在 [屬性] 視窗中顯示。Indicates whether the name of the associated property is displayed with parentheses in the Properties window. 這個類別無法被繼承。This class cannot be inherited.

public ref class ParenthesizePropertyNameAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.All)]
public sealed class ParenthesizePropertyNameAttribute : Attribute
type ParenthesizePropertyNameAttribute = class
    inherit Attribute
Public NotInheritable Class ParenthesizePropertyNameAttribute
Inherits Attribute
繼承
ParenthesizePropertyNameAttribute
屬性

備註

值為的true會向屬性視窗表示相關聯的屬性應該在其名稱前後顯示括弧。 ParenthesizePropertyNameAttribute NeedParenthesisA ParenthesizePropertyNameAttribute with a NeedParenthesis value of true indicates to the Properties window that the associated property should be displayed with parentheses around its name. 此屬性視窗會以字母模式顯示在清單頂端附近名稱的屬性, 或如果屬性視窗處於分類模式, 則靠近其類別的頂端。The Properties window displays a property with parentheses around its name near the top of the list in alphabetical mode, or near the top of its category if the Properties window is in categorize mode.

建構函式

ParenthesizePropertyNameAttribute()

初始化 ParenthesizePropertyNameAttribute 類別的新執行個體,表示關聯的屬性不應該使用括號顯示。Initializes a new instance of the ParenthesizePropertyNameAttribute class that indicates that the associated property should not be shown with parentheses.

ParenthesizePropertyNameAttribute(Boolean)

使用指示屬性是否要以括號的方式顯示的指定值,初始化 ParenthesizePropertyNameAttribute 類別的新執行個體。Initializes a new instance of the ParenthesizePropertyNameAttribute class, using the specified value to indicate whether the attribute is displayed with parentheses.

欄位

Default

使用指示關聯的屬性不應該以使用括號的方式顯示的預設值,初始化 ParenthesizePropertyNameAttribute 類別的新執行個體。Initializes a new instance of the ParenthesizePropertyNameAttribute class with a default value that indicates that the associated property should not be shown with parentheses. 此欄位為唯讀。This field is read-only.

屬性

NeedParenthesis

取得值,表示 [屬性] 視窗是否在 [屬性] 視窗中將屬性名稱以括號的方式顯示。Gets a value indicating whether the Properties window displays the name of the property in parentheses in the Properties window.

TypeId

在衍生類別中實作時,取得這個 Attribute 的唯一識別碼。When implemented in a derived class, gets a unique identifier for this Attribute.

(繼承來源 Attribute)

方法

Equals(Object)

將指定的物件與這個物件相比較,以測試二者是否相等。Compares the specified object to this object and tests for equality.

GetHashCode()

取得這個物件的雜湊程式碼。Gets the hash code for this object.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
IsDefaultAttribute()

取得值,指出目前屬性值是否為屬性的預設值。Gets a value indicating whether the current value of the attribute is the default value for the attribute.

Match(Object)

在衍生類別中覆寫時,會傳回值,表示這個執行個體是否等於指定物件。When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.

(繼承來源 Attribute)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

明確介面實作

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。Maps a set of names to a corresponding set of dispatch identifiers.

(繼承來源 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

擷取物件的類型資訊,可以用來取得介面的類型資訊。Retrieves the type information for an object, which can be used to get the type information for an interface.

(繼承來源 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

擷取物件提供的類型資訊介面數目 (0 或 1)。Retrieves the number of type information interfaces that an object provides (either 0 or 1).

(繼承來源 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

提供物件所公開的屬性和方法的存取權。Provides access to properties and methods exposed by an object.

(繼承來源 Attribute)

適用於