CodeTypeMember CodeTypeMember CodeTypeMember CodeTypeMember Class


提供型別成員的基底類別。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
public class CodeTypeMember : System.CodeDom.CodeObject
type CodeTypeMember = class
    inherit CodeObject
Public Class CodeTypeMember
Inherits CodeObject


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() CodeTypeMember() CodeTypeMember()

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


Attributes Attributes Attributes Attributes

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

Comments Comments Comments Comments

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

CustomAttributes CustomAttributes CustomAttributes CustomAttributes

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

EndDirectives EndDirectives EndDirectives EndDirectives

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

LinePragma LinePragma LinePragma LinePragma

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

Name Name Name Name

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

StartDirectives StartDirectives StartDirectives StartDirectives

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

UserData UserData UserData UserData

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

(Inherited from CodeObject)


Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

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

(Inherited from Object)