CodeTypeMember 類別

定義

提供型別成員的基底類別。Provides a base class for a member of a type. 型別成員包含欄位、方法、屬性、建構函式 (Constructor) 和巢狀型別。Type members include fields, methods, properties, constructors and nested types.

public ref class CodeTypeMember : System::CodeDom::CodeObject
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Serializable]
public class CodeTypeMember : System.CodeDom.CodeObject
type CodeTypeMember = class
    inherit CodeObject
Public Class CodeTypeMember
Inherits CodeObject
繼承
CodeTypeMember
衍生
屬性

備註

CodeTypeMember類別可以用來表示類型成員的宣告。The CodeTypeMember class can be used to represent the declaration for a member of a type. CodeTypeMember是基類, 可從中衍生更明確的成員類型, 例如CodeMemberField和。 CodeMemberMethodCodeTypeMember is a base class from which more specific types of members are derived, such as CodeMemberField and CodeMemberMethod. 這個類別包含所有類型成員通用的屬性和方法。This class contains properties and methods common to all type members.

建構函式

CodeTypeMember()

初始化 CodeTypeMember 類別的新執行個體。Initializes a new instance of the CodeTypeMember class.

屬性

Attributes

取得或設定成員的屬性 (Attribute)。Gets or sets the attributes of the member.

Comments

取得型別成員的註解集合。Gets the collection of comments for the type member.

CustomAttributes

取得或設定成員的自訂屬性。Gets or sets the custom attributes of the member.

EndDirectives

取得成員的結尾指示詞。Gets the end directives for the member.

LinePragma

取得或設定型別成員陳述式 (Statement) 所在的行。Gets or sets the line on which the type member statement occurs.

Name

取得或設定成員的名稱。Gets or sets the name of the member.

StartDirectives

取得成員的開頭指示詞。Gets the start directives for the member.

UserData

取得目前物件的使用者可定義資料。Gets the user-definable data for the current object.

(繼承來源 CodeObject)

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetType()

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

(繼承來源 Object)
MemberwiseClone()

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

(繼承來源 Object)
ToString()

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

(繼承來源 Object)

適用於

另請參閱