CodeTypeMember 类

定义

为类型的成员提供基类。Provides a base class for a member of a type. 类型成员包括字段、方法、属性、构造函数和嵌套类型。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

获取或设置成员的特性。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

获取或设置类型成员语句所在的行。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)

适用于

另请参阅