DefaultMemberAttribute(String) 构造函数

定义

初始化 DefaultMemberAttribute 类的新实例。Initializes a new instance of the DefaultMemberAttribute class.

public:
 DefaultMemberAttribute(System::String ^ memberName);
public DefaultMemberAttribute (string memberName);
new System.Reflection.DefaultMemberAttribute : string -> System.Reflection.DefaultMemberAttribute
Public Sub New (memberName As String)

参数

memberName
String

包含要调用的成员名称的 StringA String containing the name of the member to invoke. 这可能是一个构造函数、方法、属性或字段。This may be a constructor, method, property, or field. 在调用成员时必须指定合适的调用属性。A suitable invocation attribute must be specified when the member is invoked. 通过传递一个空 String 作为成员名称,可以指定类的默认成员。The default member of a class can be specified by passing an empty String as the name of the member.

类型的默认成员由 DefaultMemberAttribute 自定义属性标记,或按通常的方法在 COM 中标记。The default member of a type is marked with the DefaultMemberAttribute custom attribute or marked in COM in the usual way.

适用于